Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe something like:
Option Explicit Sub auto_open() Dim myDate As Date Dim myAddr As String Dim wCtr As Long myDate = Date myAddr = "a1" For wCtr = 1 To ThisWorkbook.Worksheets.Count If Worksheets(wCtr).Range("a1").Value <= myDate Then Application.Goto Worksheets(wCtr).Range("a1"), Scroll:=True Exit For End If Next wCtr End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Sivangen wrote: Hi, I'm trying to create a macro which will: -Open on the sheet1 -Get today's date -Compare today's date to a certain cell in the sheet -If today's date is bigger (=the date on the cell has passed) - it'll move to the next sheet and so on to the next sheets. I thought you might have some suggestions, anyone? Thanks, Sivan. -- Sivangen ------------------------------------------------------------------------ Sivangen's Profile: http://www.excelforum.com/member.php...o&userid=34925 View this thread: http://www.excelforum.com/showthread...hreadid=546614 -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional formatting for cell date to equal today's date | Excel Worksheet Functions | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
How to use Today's date in a cell and make it stay the same date | Excel Discussion (Misc queries) | |||
text and today's date in 1 cell | Excel Discussion (Misc queries) | |||
find cell with today's date | Excel Discussion (Misc queries) |