Open specific Worksheet Excel on 97-2003 Worksheet
11,864
Private Sub Workbook_Open()
Sheets("Charts_Month").Activate
End Sub
Author by
Piyush Mattoo
Updated on June 04, 2022Comments
-
Piyush Mattoo almost 2 years
I want to open a specific worksheet every time and not the one which was saved last. I have the following macro in a Microsoft Office Excel 97-2003 Worksheet (This Workbook --> Workbook, Open):
Private Sub Workbook_Open() Sheets("Charts_Month").Activate End Sub
But apparently this doesn't work. How can I fix this?
-
Piyush Mattoo over 13 yearsTried that option already doesn't work. Thanks for the recommendation though.
-
akd over 13 yearsThe above code works for me. How are you setting up your macro?
-
Piyush Mattoo over 13 yearsI clicked on Alt+F11 -> Clicked on 'This Workbook' -> Chose 'Workbook' on left dropdown and 'Open' on right drop down -> Have pasted above code there. Note that am using Microsoft Office Excel 97-2003 Worksheet. Please let me know in case am missing something anywhere.
-
akd over 13 yearsRight click on a file in your project and insert a module. Then paste your code in there. When you run that, it should work. Then to get it to work automatically, you would have to tell the workbook to run the macro when the file opens.