+ Reply to Thread
Results 1 to 5 of 5

Hide Sheet using Workbook Open Event

  1. #1

    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. #2
    Norman Jones
    Guest

    Re: Hide Sheet using Workbook Open Event

    Hi John,

    Try:

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


    ---
    Regards,
    Norman



    <[email protected]> wrote in message
    news:[email protected]...
    >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. #3
    Charlie
    Guest

    RE: 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"

    "[email protected]" 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. #4

    Re: 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. #5

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1