Apr 05 2022 04:54 AM
I would like to has specific tab (worksheet) opened based on current date.
Workbook is set up for 31 days, each tab represents a specific day of month.
I would like the proper tab opened based on current date.
Apr 05 2022 05:16 AM
Press Alt+F11 to activate the Visual Basic Editor.
Double-click ThisWorkbook under Microsoft Excel Objects in the project explorer pane on the left hand side.
Are the tabs named 1, 2, 3 etc.?
If so, copy the following code into the ThisWorkbook module:
Private Sub Workbook_Open()
Worksheets(CStr(Day(Date))).Select
End Sub
Switch back to Excel.
Save the workbook as a macro-enabled workbook (*.xlsm).
Make sure that you allow macros when you open it.