| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 60810 | 2005-08-14 02:24:00 | Excel - Opening the correct Month in a 12 sheet Workbook. | John W (523) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 380822 | 2005-08-14 02:24:00 | Ive a workbook, recording daily data for each month, each month having its own sheet. Its annoying to have to open the Workbook, then select the current month. Any ideas on an Auto_Open macro that will go to the current month sheet? Thanks.....John in Mosgiel. |
John W (523) | ||
| 380823 | 2005-08-14 06:45:00 | Hi John, Im assuming your sheets are named Jan, Feb etc. Place the following code in the ThisWorkbook module (Alt+F11, d-click on ThisWorkbook in left hand window then paste in right hand window) Private Sub Workbook_Open() Dim Sh As Worksheet For Each Sh In ThisWorkbook.Sheets If Sh.Visible = True Then If UCase(Left(Sh.Name, 3)) = UCase(Format(Now, "MMM")) _ Then Sh.Activate: Exit Sub End If Next Sh End Sub |
Parry (5696) | ||
| 1 | |||||