Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How would I go about searching for a specific worksheet and activating it
upon opening a workbook? The worksheet should be named as Todays month and date, like this... 1-30. This is what I have started... Private Sub Workbook_Open() Dim yDay, tDay, yMth, tMth Dim dFri, dMon, dNow yDay = Day(Date) - 1 tDay = Day(Date) yMth = Month(Date) - 1 tMth = Month(Date) dFri = 6 dMon = 2 dNow = Weekday(Date) If Sheets(tMth & "-" & tDay).Name = True Then Sheets(tMth & "-" & tDay).Activate Exit Sub Else MsgBox "Please create a sheet for today", vbOKOnly End If End Sub Any help would be awesome. Thanks in advance, Rob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to auto populate an invoice from data in an existing worksheet | Excel Discussion (Misc queries) | |||
Activating a Worksheet? | Excel Discussion (Misc queries) | |||
Activating a worksheet through use of a variable | Excel Worksheet Functions | |||
Macro or OLE method to insert worksheet from template workbook | Excel Discussion (Misc queries) | |||
Activating "Todays Date" column upon opening? | Excel Discussion (Misc queries) |