Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to automatically goto to today's date

I have a worksheet where I type in lists of names on a daily basis. I have
formatted the worksheet with the column headings and row numbers plus the
calendar dates for the whole month (one worksheet for one month). How can i
make the cursor go to a specified date like "today's date" when I open the
worksheet (instead of scrolling down to today's date)? Is it thru a function
or macro? I highly appreciate any help anyone can offer.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How to automatically goto to today's date

This code will select the worksheet assuming the format is Jan , Feb, Mar,
etc., and then selects the row corresponding to the day + 1 (to allow for
headings) and column B

Private Sub Workbook_Open()
With ThisWorkbook
.Worksheets(Format(Date, "mmm")).Activate
.Range("B" & Day(Date) + 1).Select
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hans gmail" <Hans wrote in message
...
I have a worksheet where I type in lists of names on a daily basis. I

have
formatted the worksheet with the column headings and row numbers plus the
calendar dates for the whole month (one worksheet for one month). How can

i
make the cursor go to a specified date like "today's date" when I open the
worksheet (instead of scrolling down to today's date)? Is it thru a

function
or macro? I highly appreciate any help anyone can offer.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How to automatically goto to today's date

Dear Bob,

I tried your code as instructed but when I tried to re-open the workbook, an
error message comes out - "Compile Error: Method or Data member not found"
and the Private Sub Workbook_Open words are highlighted yellow while the
..Range protion is highlighted in blue.

I have constructed my worksheet in such a way that I made a "Calendar" on
the side with cell G13 having the date Jan 01, 2007 and cell H13 as
Workday(G13,1); I13 as Workday(H13,1) up to K13. And G14 as Workday(K13,1) up
to K14. Then same set of formula for G15 up to K15 and G16 to K16. I then
placed in cell C41 the formula +H13 to signify the date for that day's list
of names that I need to input.

Hope things are clearer.


"Bob Phillips" wrote:

This code will select the worksheet assuming the format is Jan , Feb, Mar,
etc., and then selects the row corresponding to the day + 1 (to allow for
headings) and column B

Private Sub Workbook_Open()
With ThisWorkbook
.Worksheets(Format(Date, "mmm")).Activate
.Range("B" & Day(Date) + 1).Select
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hans gmail" <Hans wrote in message
...
I have a worksheet where I type in lists of names on a daily basis. I

have
formatted the worksheet with the column headings and row numbers plus the
calendar dates for the whole month (one worksheet for one month). How can

i
make the cursor go to a specified date like "today's date" when I open the
worksheet (instead of scrolling down to today's date)? Is it thru a

function
or macro? I highly appreciate any help anyone can offer.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How to automatically goto to today's date

Sorry, I errored, it should be

Private Sub Workbook_Open()
With ThisWorkbook.Worksheets(Format(Date, "mmm"))
.Activate
.Range("B" & Day(Date) + 1).Select
End With
End Sub



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hans gmail" wrote in message
...
Dear Bob,

I tried your code as instructed but when I tried to re-open the workbook,

an
error message comes out - "Compile Error: Method or Data member not found"
and the Private Sub Workbook_Open words are highlighted yellow while the
.Range protion is highlighted in blue.

I have constructed my worksheet in such a way that I made a "Calendar" on
the side with cell G13 having the date Jan 01, 2007 and cell H13 as
Workday(G13,1); I13 as Workday(H13,1) up to K13. And G14 as Workday(K13,1)

up
to K14. Then same set of formula for G15 up to K15 and G16 to K16. I then
placed in cell C41 the formula +H13 to signify the date for that day's

list
of names that I need to input.

Hope things are clearer.


"Bob Phillips" wrote:

This code will select the worksheet assuming the format is Jan , Feb,

Mar,
etc., and then selects the row corresponding to the day + 1 (to allow

for
headings) and column B

Private Sub Workbook_Open()
With ThisWorkbook
.Worksheets(Format(Date, "mmm")).Activate
.Range("B" & Day(Date) + 1).Select
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hans gmail" <Hans wrote in message
...
I have a worksheet where I type in lists of names on a daily basis. I

have
formatted the worksheet with the column headings and row numbers plus

the
calendar dates for the whole month (one worksheet for one month). How

can
i
make the cursor go to a specified date like "today's date" when I open

the
worksheet (instead of scrolling down to today's date)? Is it thru a

function
or macro? I highly appreciate any help anyone can offer.






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How to automatically goto to today's date

Dear Bob,
The new module works, it goes to the row number + 1 of today's date. But
what i need is different. I have typed in (actually used a formula) all the
dates of the month at roughly every 15 rows. When I open the workbook, I have
to scroll down to the area of today's date. What I wanted is if upon opening,
the cursor will go to "today's date" whereever it is several rows down.

Thanks in advance.

"Bob Phillips" wrote:

Sorry, I errored, it should be

Private Sub Workbook_Open()
With ThisWorkbook.Worksheets(Format(Date, "mmm"))
.Activate
.Range("B" & Day(Date) + 1).Select
End With
End Sub



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hans gmail" wrote in message
...
Dear Bob,

I tried your code as instructed but when I tried to re-open the workbook,

an
error message comes out - "Compile Error: Method or Data member not found"
and the Private Sub Workbook_Open words are highlighted yellow while the
.Range protion is highlighted in blue.

I have constructed my worksheet in such a way that I made a "Calendar" on
the side with cell G13 having the date Jan 01, 2007 and cell H13 as
Workday(G13,1); I13 as Workday(H13,1) up to K13. And G14 as Workday(K13,1)

up
to K14. Then same set of formula for G15 up to K15 and G16 to K16. I then
placed in cell C41 the formula +H13 to signify the date for that day's

list
of names that I need to input.

Hope things are clearer.


"Bob Phillips" wrote:

This code will select the worksheet assuming the format is Jan , Feb,

Mar,
etc., and then selects the row corresponding to the day + 1 (to allow

for
headings) and column B

Private Sub Workbook_Open()
With ThisWorkbook
.Worksheets(Format(Date, "mmm")).Activate
.Range("B" & Day(Date) + 1).Select
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hans gmail" <Hans wrote in message
...
I have a worksheet where I type in lists of names on a daily basis. I
have
formatted the worksheet with the column headings and row numbers plus

the
calendar dates for the whole month (one worksheet for one month). How

can
i
make the cursor go to a specified date like "today's date" when I open

the
worksheet (instead of scrolling down to today's date)? Is it thru a
function
or macro? I highly appreciate any help anyone can offer.






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
how do I program a cell to automatically fill in today;s date? allanlevy7342 Excel Worksheet Functions 1 September 12th 06 03:24 PM
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Setting traffic lights based on todays date against target dates HDV Excel Discussion (Misc queries) 2 September 14th 05 12:05 PM
calculate no. of years between a date and today's date Sue Excel Worksheet Functions 10 June 14th 05 02:56 AM


All times are GMT +1. The time now is 11:29 AM.

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"