View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Open to today's date

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)

DayofWeek = Weekday(Date)

'6 is the Friday Day considering Sunday as 1
FridayDate = Date + (6 - DayofWeek)

SheetName = "WE " & Month(FridayDate) & "/" & Day(FridayDate)
Worksheets(SheetName & Weeknumber).Activate
Range("B3").Offset(0, DayofWeek - 1).Activate
End Sub

"KathyN" wrote:

Rick,

The worksheets are named 'WE m/d' corresponding to each Friday, i.e. WE 5/9.
The dates are in cells B3:G3 in each sheet, and are formatted m/dd/yyy.

Thanks

"Rick Rothstein (MVP - VB)" wrote:

How are the worksheets named? Which "same row" are the dates in? Which
cells? The more information you give us about your set up, the better able
we are to figure out what to tell you; otherwise, we are reduced to pure
guessing and those guesses usually turn out to be wrong.

Rick


"KathyN" wrote in message
...
Hello

I have a workbook with a sheet for each week of the year. The dates are
in
the same row in each sheet. I would like to be able to have the workbook
open to the sheet that contains today's date.

Thanks for your help!