Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I program a cell to automatically fill in today;s date? | Excel Worksheet Functions | |||
Mileage Claim Formula | New Users to Excel | |||
NETWORKDAYS - Multiple Date Selection | Excel Discussion (Misc queries) | |||
Setting traffic lights based on todays date against target dates | Excel Discussion (Misc queries) | |||
calculate no. of years between a date and today's date | Excel Worksheet Functions |