Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Hide Sheet using Workbook Open Event

I know this is simple, but I can't seem to get it to work. I want to
hide (make not visible) the HelpSheet worksheet. I was going to use
the WorkbookOpen event to make sure it is not visible each time the
workbook is opened.

Private Sub XL_WorkbookOpen(ByVal Wb As Workbook)
Worksheets("HelpSheet").Visible = xlSheetVeryHidden
End Sub

I have the above code in a class module. But the sheet is still
visible. Where did I go wrong?

Thanks,
John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Hide Sheet using Workbook Open Event

Hi John,

Try:

Private Sub Workbook_Open()
Worksheets("HelpSheet").Visible = xlSheetVeryHidden
End Sub


---
Regards,
Norman



wrote in message
ups.com...
I know this is simple, but I can't seem to get it to work. I want to
hide (make not visible) the HelpSheet worksheet. I was going to use
the WorkbookOpen event to make sure it is not visible each time the
workbook is opened.

Private Sub XL_WorkbookOpen(ByVal Wb As Workbook)
Worksheets("HelpSheet").Visible = xlSheetVeryHidden
End Sub

I have the above code in a class module. But the sheet is still
visible. Where did I go wrong?

Thanks,
John



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Hide Sheet using Workbook Open Event

Put your code in:

Private Sub Workbook_Open()

End Sub

which is in ThisWorkbook under the folder "Microsoft Excel Objects"

" wrote:

I know this is simple, but I can't seem to get it to work. I want to
hide (make not visible) the HelpSheet worksheet. I was going to use
the WorkbookOpen event to make sure it is not visible each time the
workbook is opened.

Private Sub XL_WorkbookOpen(ByVal Wb As Workbook)
Worksheets("HelpSheet").Visible = xlSheetVeryHidden
End Sub

I have the above code in a class module. But the sheet is still
visible. Where did I go wrong?

Thanks,
John


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Hide Sheet using Workbook Open Event

Used your code...thank you very much....but the worksheet is still
visible. What is the deal?

Thanks again,
John

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Hide Sheet using Workbook Open Event

Got it. Your code is correct....but you knew that. It needed to be in
the ThisWorkbook module. Not in a class module.

John

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
Workbook open event Pawan Excel Worksheet Functions 7 August 26th 08 07:32 AM
Event: open workbook Jeff Excel Discussion (Misc queries) 1 September 28th 06 02:58 PM
workbook open event JT[_2_] Excel Programming 2 December 22nd 04 03:59 PM
Workbook Open event Libby Excel Programming 1 November 29th 04 04:10 PM
Workbook Open event Todd Huttenstine Excel Programming 1 April 21st 04 07:06 PM


All times are GMT +1. The time now is 11:44 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"