From: Glenn on
Is it possible to determine which sheets appear when a workbook is opened. I
have a workbook with a number of hidden sheets that are updated by me from
time to time and I would like them to start off hidden when the workbook is
opened by say, someone else on the network. I have toyed with the Workbook
Open in VB but to no avail. Many thanks

Glenn
From: ryguy7272 on
No problem. Hit Alt+F11. Under Project-VBA Project, you will see a small
file named 'ThisWorkbook'. Double-click and copy/paste the following code
into the window that opens:
Private Sub Workbook_Open()
Worksheets("Example").Activate
End Sub

"Example" is the name of the worksheet that you want open when the workbook
opens, so change this to suit your specific needs.


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Glenn" wrote:

> Is it possible to determine which sheets appear when a workbook is opened. I
> have a workbook with a number of hidden sheets that are updated by me from
> time to time and I would like them to start off hidden when the workbook is
> opened by say, someone else on the network. I have toyed with the Workbook
> Open in VB but to no avail. Many thanks
>
> Glenn
From: Gary Keramidas on
if i understand correctly, maybe something like this in the workbook open
event

Private Sub Workbook_Open()
If UCase(Environ("username")) = "GLENN" Then
Worksheets("sheet1").Visible = True
Else
Worksheets("sheet1").Visible = False
End If
End Sub

--


Gary Keramidas
Excel 2003


"Glenn" <Glenn(a)discussions.microsoft.com> wrote in message
news:B9F28BDF-7577-4F24-980F-98D350910D39(a)microsoft.com...
> Is it possible to determine which sheets appear when a workbook is opened.
> I
> have a workbook with a number of hidden sheets that are updated by me from
> time to time and I would like them to start off hidden when the workbook
> is
> opened by say, someone else on the network. I have toyed with the
> Workbook
> Open in VB but to no avail. Many thanks
>
> Glenn

From: Glenn on
Many thanks. Just tried it. It made the sheet I want active but, didn't
make it the only sheet visible which is my ultimate aim.

"ryguy7272" wrote:

> No problem. Hit Alt+F11. Under Project-VBA Project, you will see a small
> file named 'ThisWorkbook'. Double-click and copy/paste the following code
> into the window that opens:
> Private Sub Workbook_Open()
> Worksheets("Example").Activate
> End Sub
>
> "Example" is the name of the worksheet that you want open when the workbook
> opens, so change this to suit your specific needs.
>
>
> --
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
>
>
> "Glenn" wrote:
>
> > Is it possible to determine which sheets appear when a workbook is opened. I
> > have a workbook with a number of hidden sheets that are updated by me from
> > time to time and I would like them to start off hidden when the workbook is
> > opened by say, someone else on the network. I have toyed with the Workbook
> > Open in VB but to no avail. Many thanks
> >
> > Glenn
From: Gary Brown on
Give this a show Glenn...

Private Sub Workbook_Open()
Dim wks As Worksheet

Worksheets("Sheet1").Activate

For Each wks In Worksheets
If wks.Name <> "Sheet1" Then
wks.Visible = xlSheetHidden
End If
Next wks

End Sub

--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"Glenn" wrote:

> Many thanks. Just tried it. It made the sheet I want active but, didn't
> make it the only sheet visible which is my ultimate aim.
>
> "ryguy7272" wrote:
>
> > No problem. Hit Alt+F11. Under Project-VBA Project, you will see a small
> > file named 'ThisWorkbook'. Double-click and copy/paste the following code
> > into the window that opens:
> > Private Sub Workbook_Open()
> > Worksheets("Example").Activate
> > End Sub
> >
> > "Example" is the name of the worksheet that you want open when the workbook
> > opens, so change this to suit your specific needs.
> >
> >
> > --
> > Ryan---
> > If this information was helpful, please indicate this by clicking ''Yes''.
> >
> >
> > "Glenn" wrote:
> >
> > > Is it possible to determine which sheets appear when a workbook is opened. I
> > > have a workbook with a number of hidden sheets that are updated by me from
> > > time to time and I would like them to start off hidden when the workbook is
> > > opened by say, someone else on the network. I have toyed with the Workbook
> > > Open in VB but to no avail. Many thanks
> > >
> > > Glenn