Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default Q - Open Specific Sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default Q - Open Specific Sheet

Damn! I'd been looking at it for ages

Thanks
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Q - Open Specific Sheet

Try worksheets with an s on the end.

Application.ScreenUpdating = False
Worksheets("Header").Activate
--
Regards,

OssieMac


"Seanie" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
open workbook to specific sheet Mr E[_2_] Excel Worksheet Functions 1 April 9th 10 06:53 PM
Open a specific sheet with VBA Joel Excel Programming 2 November 1st 07 04:27 PM
How do I open a workbook in a specific sheet PetterSn Excel Discussion (Misc queries) 3 January 12th 06 06:44 AM
Open Specific Sheet in Workbook jhahes[_9_] Excel Programming 1 June 24th 05 09:26 PM
Go to a specific sheet on open Andy Josolyne[_2_] Excel Programming 1 March 2nd 05 12:31 PM


All times are GMT +1. The time now is 03:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"