ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Opening up named worksheets according to the day of the month (https://www.excelbanter.com/excel-discussion-misc-queries/83563-opening-up-named-worksheets-according-day-month.html)

Steven

Opening up named worksheets according to the day of the month
 
Please help - Trying to write macro that would open up to a certained named
worksheet (1-31) based on the day of the current month. I have created a
formula =DAY(LEFT(NOW(),5)) that calaculates a value. Now I need it to
open up the corresponding named sheet.

Any help would be appreciated. TIA.

Ardus Petus

Opening up named worksheets according to the day of the month
 
Without any error checking (all worksheets must exist):

Private Sub Workbook_Open()
Worksheets(Format(Day(Date), 0)).Activate
End Sub

HTH
--
AP

"Steven" a écrit dans le message de
...
Please help - Trying to write macro that would open up to a certained

named
worksheet (1-31) based on the day of the current month. I have created a
formula =DAY(LEFT(NOW(),5)) that calaculates a value. Now I need it to
open up the corresponding named sheet.

Any help would be appreciated. TIA.




Steven

Opening up named worksheets according to the day of the month
 
Ardus - you did it. Thanks. Without the error checking it works beautiful.
Thanks for the quick response. Have a Guinness on me.

Cheers

"Ardus Petus" wrote:

Without any error checking (all worksheets must exist):

Private Sub Workbook_Open()
Worksheets(Format(Day(Date), 0)).Activate
End Sub

HTH
--
AP

"Steven" a écrit dans le message de
...
Please help - Trying to write macro that would open up to a certained

named
worksheet (1-31) based on the day of the current month. I have created a
formula =DAY(LEFT(NOW(),5)) that calaculates a value. Now I need it to
open up the corresponding named sheet.

Any help would be appreciated. TIA.






All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com