Default a specific worksheet to be in forefront when open excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Have multiple worksheets in an excel file and want a specific worksheet to be
in the forefront when opening the excel file. How to do this?
 
j,

Put this code into the codemodule of the ThisWorkbook Object.

Private Sub Workbook_Open()
Worksheets(1).Activate
End Sub

Change the 1 to the specific sheet index.

Or, if the users can change the order of the sheets or add new sheet, and you want a specific sheet
selected:

Private Sub Workbook_Open()
Worksheets("Sheet Name").Activate
End Sub

Or, if users might change the name on the tab of that specific sheet:

Private Sub Workbook_Open()
shtCodeName.Activate
End Sub

If you are unclear on the how to implement any of these, post back.

HTH,
Bernie Deitrick
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top