Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I originally had the following in ThisWorkbook Private Sub Workbook_Open() Dim sht As Worksheet Const TopLeft As String = "a2" Application.ScreenUpdating = False For Each sht In Worksheets Application.Goto sht.Range(TopLeft), Scroll:=True sht.Protect Password:="*gwb", _ UserInterFaceOnly:=True Next sht Application.ScreenUpdating = True Sheets("Sheet1").Select Now I'm trying to make users enable macros by hiding sheets. Sheets("Sheet1").Visible = True Sheets("Warning").Visible = xlVeryHidden Sheets("STEP 1").Visible = True and so on for approx twenty sheets before the For each bit. I was intending to make an array of sheets that I can make visible but I can't get both bits of the macro working at the same time as I get a runtime error. Is it because I also have some sheets in the workbook that are hidden normally or because of the very hidden sheet? Any ideas on what I need to do would be brilliant! Cheers |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
one code to do multiple things | New Users to Excel | |||
how can i open a second workbook using a vba code | Excel Discussion (Misc queries) | |||
Set certain things when opening the Workbook | New Users to Excel | |||
Need VB code for workbook open to open a link | Excel Discussion (Misc queries) | |||
Help!!!! Strange things are happening to a Shared Workbook!! | Excel Worksheet Functions |