C
cassidyr1
Hi,
I have a problem with xl 97. I have the following code in m
workbook_open event:-
Private Sub workbook_open()
Application.ScreenUpdating = False
Call CheckMacrosEnabled 'Sets all the sheets to be visible
Call Toolbar
Call UpdateContents
ThisWorkbook.Sheets("Cover Sheet").Select
Application.ScreenUpdating = True
End Sub
Public Sub CheckMacrosEnabled() - is just a simple function that loop
through all the pages and then sets the sheets to be visible.
This works fine in XP.
In xl 97, on open, the CheckMacrosEnabled subroutine is called, but i
unable to set the visible state of the sheets (from 2 to -1). However
once the workbook is open, by running the workbook_open event from th
VBA editor CheckMacrosEnabled is called and can make the sheet
visible.
The line ThisWorkbook.Sheets("Cover Sheet").Select should also give a
error as it cannot make any of the sheets visible, and so the cove
sheet is hidden and so this should give an error but doesn't.
Just wondered if anyone could shed any light on this? Thanks i
advance,
Richar
I have a problem with xl 97. I have the following code in m
workbook_open event:-
Private Sub workbook_open()
Application.ScreenUpdating = False
Call CheckMacrosEnabled 'Sets all the sheets to be visible
Call Toolbar
Call UpdateContents
ThisWorkbook.Sheets("Cover Sheet").Select
Application.ScreenUpdating = True
End Sub
Public Sub CheckMacrosEnabled() - is just a simple function that loop
through all the pages and then sets the sheets to be visible.
This works fine in XP.
In xl 97, on open, the CheckMacrosEnabled subroutine is called, but i
unable to set the visible state of the sheets (from 2 to -1). However
once the workbook is open, by running the workbook_open event from th
VBA editor CheckMacrosEnabled is called and can make the sheet
visible.
The line ThisWorkbook.Sheets("Cover Sheet").Select should also give a
error as it cannot make any of the sheets visible, and so the cove
sheet is hidden and so this should give an error but doesn't.
Just wondered if anyone could shed any light on this? Thanks i
advance,
Richar