Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Workbook_Open Event questions

When a workbook opens, I need to do the following:

1) Insert the current date into a cell (H11) in the form
Friday 25th June 2004.

2) Increment the value in cell "J9" by 1, where the J9
value was /1000/ and would become /1001/
(can I do this quickly without using Split?).

Regards and thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Workbook_Open Event questions

1) Range("H11").Value = Format(Date,"dddd dd mmm yyyy")

can't get the date suffix (st, th, etc.) without lots of work

2) With Range("J9")
,Value = "/" &Clng(Mid(.Value,2,4))+1 & "/"
End With

All in the WorkbookOpen event in ThisWorkbook code module

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
When a workbook opens, I need to do the following:

1) Insert the current date into a cell (H11) in the form
Friday 25th June 2004.

2) Increment the value in cell "J9" by 1, where the J9
value was /1000/ and would become /1001/
(can I do this quickly without using Split?).

Regards and thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Workbook_Open Event questions

Many thanks.

Lots of work not required !

Regards.

"Bob Phillips" wrote in message
...
1) Range("H11").Value = Format(Date,"dddd dd mmm yyyy")

can't get the date suffix (st, th, etc.) without lots of work

2) With Range("J9")
,Value = "/" &Clng(Mid(.Value,2,4))+1 & "/"
End With

All in the WorkbookOpen event in ThisWorkbook code module

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
When a workbook opens, I need to do the following:

1) Insert the current date into a cell (H11) in the form
Friday 25th June 2004.

2) Increment the value in cell "J9" by 1, where the J9
value was /1000/ and would become /1001/
(can I do this quickly without using Split?).

Regards and thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Workbook_Open Event questions

Just spotted a type

2) With Range("J9")
,Value = "/" &Clng(Mid(.Value,2,4))+1 & "/"
End With

should be

2) With Range("J9")
.Value = "/" &CLng(Mid(.Value,2,4))+1 & "/"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
Many thanks.

Lots of work not required !

Regards.

"Bob Phillips" wrote in message
...
1) Range("H11").Value = Format(Date,"dddd dd mmm yyyy")

can't get the date suffix (st, th, etc.) without lots of work

2) With Range("J9")
,Value = "/" &Clng(Mid(.Value,2,4))+1 & "/"
End With

All in the WorkbookOpen event in ThisWorkbook code module

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
When a workbook opens, I need to do the following:

1) Insert the current date into a cell (H11) in the form
Friday 25th June 2004.

2) Increment the value in cell "J9" by 1, where the J9
value was /1000/ and would become /1001/
(can I do this quickly without using Split?).

Regards and thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Workbook_Open Event questions

Found it too. No probs.
Regards.

"Bob Phillips" wrote in message
...
Just spotted a type

2) With Range("J9")
,Value = "/" &Clng(Mid(.Value,2,4))+1 & "/"
End With

should be

2) With Range("J9")
.Value = "/" &CLng(Mid(.Value,2,4))+1 & "/"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
Many thanks.

Lots of work not required !

Regards.

"Bob Phillips" wrote in message
...
1) Range("H11").Value = Format(Date,"dddd dd mmm yyyy")

can't get the date suffix (st, th, etc.) without lots of work

2) With Range("J9")
,Value = "/" &Clng(Mid(.Value,2,4))+1 & "/"
End With

All in the WorkbookOpen event in ThisWorkbook code module

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
When a workbook opens, I need to do the following:

1) Insert the current date into a cell (H11) in the form
Friday 25th June 2004.

2) Increment the value in cell "J9" by 1, where the J9
value was /1000/ and would become /1001/
(can I do this quickly without using Split?).

Regards and thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.710 / Virus Database: 466 - Release Date: 23/06/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook_Open() Event Bill Martin Excel Discussion (Misc queries) 9 January 13th 06 08:24 PM
Workbook_open Event Bruce Maston Excel Programming 6 April 6th 04 01:19 AM
Workbook_Open Event Squid[_2_] Excel Programming 7 February 8th 04 06:49 PM
WorkBook_Open Event Squid[_3_] Excel Programming 1 February 8th 04 02:45 AM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


All times are GMT +1. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"