Open specific Worksheet Excel on 97-2003 Worksheet

11,864
Private Sub Workbook_Open()
Sheets("Charts_Month").Activate
End Sub
Share:
11,864
Piyush Mattoo
Author by

Piyush Mattoo

Updated on June 04, 2022

Comments

  • Piyush Mattoo
    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
    Piyush Mattoo over 13 years
    Tried that option already doesn't work. Thanks for the recommendation though.
  • akd
    akd over 13 years
    The above code works for me. How are you setting up your macro?
  • Piyush Mattoo
    Piyush Mattoo over 13 years
    I 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
    akd over 13 years
    Right 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.