![]() |
On open goto today
I have a work book that has 3 work sheets. One sheet has year 2009 listed as
dates in colum A, i was a able to conditional format this sheet to high lite todays date. question is when i open this sheet , i want to automaticaly goto the row that is todays date? Any sugestion would be apreciated. |
On open goto today
Right click sheet tabview codeinsert this
Private Sub Worksheet_Activate() mydate = Date columns(1).Find(What:=mydate, LookIn:=xlFormulas, _ SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Nemo" wrote in message ... I have a work book that has 3 work sheets. One sheet has year 2009 listed as dates in colum A, i was a able to conditional format this sheet to high lite todays date. question is when i open this sheet , i want to automaticaly goto the row that is todays date? Any sugestion would be apreciated. |
On open goto today
This assumes that the tab name containing the list of dates is 2009. In the
workbook code area, insert the following event macro: Private Sub Workbook_Open() Sheets("2009").Activate Dim d As Date d = Date For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row If Cells(i, 1).Value = d Then Cells(i, 1).Select Exit Sub End If Next End Sub Because it is workbook code, it is very easy to install and use: 1. right-click the tiny Excel icon just to the left of File on the Menu Bar 2. select View Code - this brings up a VBE window 3. paste the stuff in and close the VBE window If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE windows as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm To learn more about Event Macros (workbook code), see: http://www.mvps.org/dmcritchie/excel/event.htm -- Gary''s Student - gsnu200908 "Nemo" wrote: I have a work book that has 3 work sheets. One sheet has year 2009 listed as dates in colum A, i was a able to conditional format this sheet to high lite todays date. question is when i open this sheet , i want to automaticaly goto the row that is todays date? Any sugestion would be apreciated. |
All times are GMT +1. The time now is 07:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com