View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Q - Open Specific Sheet

This works for me
Private Sub Workbook_Open()
Worksheets("Sheet3").Activate
End Sub

1) I have "Worksheets" with an S at the end
2) This module in a workbook module. In Excel 2003 (and before), click the
Excel logo next to File in the Menu Bar and use View Code - this is where
the module should be. OR, in any version, open the VB editor and then open
the ThisWorkbook module for the workbook in question.

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Seanie" wrote in message
...
I have the code below under ThisWorkbook, but it returns an error
"Compile Error in Hidden Module: ThisWorkbook" - why is that? My sheet
"Header" is not hidden, although I do have other sheets hidden

Private Sub Workbook_Open()

Application.ScreenUpdating = False
Worksheet("Header").Activate

End Sub