Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dears,
I want the workbook when it is opened to activate a specific sheet and hide the remaining sheets. please help me in this regard. thanks, naweed |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put the following code in the ThisWorkbook module:
Private Sub Workbook_Open() Dim ws As Worksheet For Each ws In Worksheets If ws.name < "xxx" then ws.Visible = xlSheetHidden Next End Sub __________________________________________________ _______________________ "User" wrote in message ups.com... dears, I want the workbook when it is opened to activate a specific sheet and hide the remaining sheets. please help me in this regard. thanks, naweed |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
Private Sub Workbook_Open() Sheet1.Activate Sheet2.Visible = xlSheetHidden Sheet3.Visible = xlSheetHidden End Sub "User" wrote: dears, I want the workbook when it is opened to activate a specific sheet and hide the remaining sheets. please help me in this regard. thanks, naweed |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:-
Private Sub Workbook_Open() For i = 1 To ActiveWorkbook.Worksheets.Count Worksheets(i).Select If Worksheets(i).Name < "Sheet1" Then ' Change to be the one you want active Worksheets(i).Visible = False End If Next i End Sub Mike "User" wrote: dears, I want the workbook when it is opened to activate a specific sheet and hide the remaining sheets. please help me in this regard. thanks, naweed |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No need to select any of the worksheets.
__________________________________________________ _______________________ "Mike H" wrote in message ... Try:- Private Sub Workbook_Open() For i = 1 To ActiveWorkbook.Worksheets.Count Worksheets(i).Select If Worksheets(i).Name < "Sheet1" Then ' Change to be the one you want active Worksheets(i).Visible = False End If Next i End Sub Mike "User" wrote: dears, I want the workbook when it is opened to activate a specific sheet and hide the remaining sheets. please help me in this regard. thanks, naweed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WorkBook open event | Excel Programming | |||
workbook open event | Excel Programming | |||
Workbook Open Event | Excel Programming | |||
Workbook Open event | Excel Programming | |||
Workbook Open Event | Excel Programming |