Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dear Excell(ent) users,
I have a file with multiple sheets. In those sheets I work with dates (dd-mm-yy). What I am looking for is a macro which opens the file in those sheets at the current date. For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when I open that sheet, the cursor should be in BX3. Can you help me, please? Thank you ! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You would want to use an Event macro.
Event Macros, Worksheet Events and Workbook Events http://www.mvps.org/dmcritchie/excel/event.htm Worksheet_Activate Event (#ws_activate) http://www.mvps.org/dmcritchie/excel...tm#ws_activate which is set up for the current date upon sheet activation you can limit it to a specific column. --- HTH, David McRitchie, Microsoft MVP - Excel My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "The Fool on the Hill" wrote in message ... Dear Excell(ent) users, I have a file with multiple sheets. In those sheets I work with dates (dd-mm-yy). What I am looking for is a macro which opens the file in those sheets at the current date. For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when I open that sheet, the cursor should be in BX3. Can you help me, please? Thank you ! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Put this in Worksheet code for the sheet in question:
Private Sub Worksheet_Activate() Dim s As String s = Date For Each r In ActiveSheet.UsedRange If Not IsEmpty(r) Then If s = r.Value Then r.Select Exit Sub End If End If Next End Sub -- Gary''s Student - gsnu200720 "The Fool on the Hill" wrote: Dear Excell(ent) users, I have a file with multiple sheets. In those sheets I work with dates (dd-mm-yy). What I am looking for is a macro which opens the file in those sheets at the current date. For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when I open that sheet, the cursor should be in BX3. Can you help me, please? Thank you ! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
To have the activate operate on all sheets place the code into Thisworkbook
module and rename to Private Sub Workbook_SheetActivate(ByVal Sh As Object) Gord Dibben MS Excel MVP On Fri, 11 May 2007 07:36:00 -0700, Gary''s Student wrote: Put this in Worksheet code for the sheet in question: Private Sub Worksheet_Activate() Dim s As String s = Date For Each r In ActiveSheet.UsedRange If Not IsEmpty(r) Then If s = r.Value Then r.Select Exit Sub End If End If Next End Sub -- Gary''s Student - gsnu200720 "The Fool on the Hill" wrote: Dear Excell(ent) users, I have a file with multiple sheets. In those sheets I work with dates (dd-mm-yy). What I am looking for is a macro which opens the file in those sheets at the current date. For instance 15-03-2007 is in Cell BX3, so when it would be 15-03-2007 when I open that sheet, the cursor should be in BX3. Can you help me, please? Thank you ! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Jumping to the next cell automaticly | Excel Discussion (Misc queries) | |||
Jumping Cursor | New Users to Excel | |||
Jumping Between Sheets! | Excel Discussion (Misc queries) | |||
How do I stop the input cell from jumping to the mouse cursor? | Excel Discussion (Misc queries) | |||
Highlighted cell jumping to cursor location | Excel Discussion (Misc queries) |