#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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.

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
Open file if cell date is less than today+30 day? NeedToKnow Excel Worksheet Functions 2 August 19th 09 07:29 PM
set up macro to goto cell with "today" in Stuart WJG Excel Worksheet Functions 7 March 13th 08 03:19 PM
GOTO today? annm Excel Worksheet Functions 3 February 15th 08 04:13 PM
Open an Excel file with a date as today in a macro Perry Excel Discussion (Misc queries) 4 November 10th 05 09:57 AM
=IF(OR(TODAY()G9),"Pass","Overdue") Why doe it not wo. Fkor Excel Discussion (Misc queries) 3 March 10th 05 08:29 AM


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

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

About Us

"It's about Microsoft Excel"