Results 1 to 8 of 8

HIDDEN SHEET

This is a discussion on HIDDEN SHEET within the Excel Questions forums, part of the Question Forums category; I have a workbook with 3 sheets. I want by opening this workbook,that autmatickly sheet1 is hidden. Can somebody help ...

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    1,321

    Default

    I have a workbook with 3 sheets.
    I want by opening this workbook,that autmatickly sheet1 is hidden.
    Can somebody help me with a macro to do this?
    Many thanks in advance.

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824

    Default

    Here you go:


    Private Sub Workbook_Open()
    Sheet1.Visible = xlSheetHidden
    End Sub



    Tom

  3. #3
    klb
    klb is offline
    Board Regular
    Join Date
    Apr 2002
    Location
    Minnesota
    Posts
    821

    Default

    Why not just hide the sheet before you save it and when you open it the next time it will be hidden?

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Posts
    1,321

    Default

    On 2002-05-07 05:49, TsTom wrote:
    Here you go:


    Private Sub Workbook_Open()
    Sheet1.Visible = xlSheetHidden
    End Sub


    Thanks,Tom,but where do I insert this macro?
    Many thanks for answer.




    Tom

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824

    Default

    From your Excel worksheet, rightclick on the
    Excel icon immediately left of your file menu item(Upper left hand corner), choose "View Code", paste this code there.

    If the procedure already exists, then just paste the one line into the existing procedure.

    Should end up in your workbook class module.

    Tom

  6. #6
    Board Regular
    Join Date
    Mar 2002
    Posts
    1,321

    Default

    On 2002-05-07 06:15, TsTom wrote:
    From your Excel worksheet, rightclick on the
    Excel icon immediately left of your file menu item(Upper left hand corner), choose "View Code", paste this code there.

    If the procedure already exists, then just paste the one line into the existing procedure.

    Should end up in your workbook class module.

    Tom

    [/quote]
    Hi,Tom,

    I have insert your macro on the place it must.But when I run the macro(open the workbook) then there is another sheet that is hidden and not Sheet1
    Any idea?
    Thanks

  7. #7
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530

    Default

    Use :


    Private Sub Workbook_Open()
    Sheets("Sheet1").Visible = xlSheetHidden
    End Sub


    This causes the sheet called "Sheet1" to be used and not the programmatic "Sheet1".

    The difference is that the sheet called "Sheet1" has the name "Sheet1" on the worksheet nametab.

    The programmatic "Sheet1" is the first sheet that was added to the workbook. You've either deleted this or named it something else.

    HTH


  8. #8
    Board Regular
    Join Date
    Mar 2002
    Posts
    1,321

    Default

    On 2002-05-07 06:48, Mark O'Brien wrote:
    Use :


    Private Sub Workbook_Open()
    Sheets("Sheet1").Visible = xlSheetHidden
    End Sub


    This causes the sheet called "Sheet1" to be used and not the programmatic "Sheet1".

    The difference is that the sheet called "Sheet1" has the name "Sheet1" on the worksheet nametab.

    The programmatic "Sheet1" is the first sheet that was added to the workbook. You've either deleted this or named it something else.

    HTH

    Thanks Marc and Tom,it works fine now.
    Great help.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com