Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Could someone please help me with the following. I want all worksheets to be hidden except for Sheet1 and Sheet2. when the Workbook opens. I don't know if this matters but some of the sheets are named through VBE - like SheetMain, instead of Sheet30. Thanks for any help -- jhahes ------------------------------------------------------------------------ jhahes's Profile: http://www.excelforum.com/member.php...o&userid=23596 View this thread: http://www.excelforum.com/showthread...hreadid=392349 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Workbook_Open()
Dim sh As Worksheet For Each sh In ThisWorkbook.Worksheets If sh.Name < "Sheet1" And sh.Name < "Sheet2" Then sh.Visible = xlSheetHidden End If Next sh End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH RP (remove nothere from the email address if mailing direct) "jhahes" wrote in message ... Could someone please help me with the following. I want all worksheets to be hidden except for Sheet1 and Sheet2. when the Workbook opens. I don't know if this matters but some of the sheets are named through VBE - like SheetMain, instead of Sheet30. Thanks for any help -- jhahes ------------------------------------------------------------------------ jhahes's Profile: http://www.excelforum.com/member.php...o&userid=23596 View this thread: http://www.excelforum.com/showthread...hreadid=392349 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide/Show some worksheets | Excel Discussion (Misc queries) | |||
How to hide worksheets | New Users to Excel | |||
Workbook_Open Problem ... Worksheets not loaded yet!? | Excel Programming | |||
hide TASKBAR in Sub Workbook_open() | Excel Programming | |||
Hide/Unhide worksheets help | Excel Programming |