Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro cannot access hidden sheet
My macro works fine until I hide a sheet that it needs to use. The code stops
at the last line below: Dim r As Range Sheets("Main Page").Select If IsError(Range("B3").Value) = False Then GoTo DoubleClick Set r = Range("D5:M5") Sheets("Part Numbers").Select < Unhiding the sheet (Part Numbers) clears up the problem, but I would prefer to have it hidden. What's the trick? Thanks. Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro cannot access hidden sheet
Hi,
You have choices. 1. Fleetingly unhide your sheet with code, do what you want and then re-hide it. 2. Do what you need to do without selecting the sheet. For example this works perfectly on a hidden sheet Sheets("Sheet1").Range("A1").Value = 999 If you need help with the latter option we would need to see your code. Mike "MichaelRobert" wrote: My macro works fine until I hide a sheet that it needs to use. The code stops at the last line below: Dim r As Range Sheets("Main Page").Select If IsError(Range("B3").Value) = False Then GoTo DoubleClick Set r = Range("D5:M5") Sheets("Part Numbers").Select < Unhiding the sheet (Part Numbers) clears up the problem, but I would prefer to have it hidden. What's the trick? Thanks. Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro cannot access hidden sheet
You can change application.screenupdating = false before you access it and
the user would never see a thing either. Set back to trued after you have rehidden of course. -- -John Please rate when your question is answered to help us and others know what is helpful. "Mike H" wrote: Hi, You have choices. 1. Fleetingly unhide your sheet with code, do what you want and then re-hide it. 2. Do what you need to do without selecting the sheet. For example this works perfectly on a hidden sheet Sheets("Sheet1").Range("A1").Value = 999 If you need help with the latter option we would need to see your code. Mike "MichaelRobert" wrote: My macro works fine until I hide a sheet that it needs to use. The code stops at the last line below: Dim r As Range Sheets("Main Page").Select If IsError(Range("B3").Value) = False Then GoTo DoubleClick Set r = Range("D5:M5") Sheets("Part Numbers").Select < Unhiding the sheet (Part Numbers) clears up the problem, but I would prefer to have it hidden. What's the trick? Thanks. Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to run on hidden sheet | Excel Discussion (Misc queries) | |||
Refer to a hidden sheet using a macro. | Excel Programming | |||
Using a Macro to look at Hidden Sheet | Excel Discussion (Misc queries) | |||
Macro for hidden sheet access | Excel Programming | |||
Macro dependent on hidden sheet? | Excel Programming |