Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refer to a hidden sheet using a macro.
I have written a macro that will move data into a sheet that is hidden.
However, when I run it I get the debugger message telling me it has failed. If I unhide the sheet and run it then it works fine. What is the best way round this? Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refer to a hidden sheet using a macro.
In article ,
says... I have written a macro that will move data into a sheet that is hidden. However, when I run it I get the debugger message telling me it has failed. If I unhide the sheet and run it then it works fine. What is the best way round this? Thanks in advance. What is the code that moves the data? My guess is you are activating or selecting something on the hidden sheet. -- Regards, Tushar Mehta www.tushar-mehta.com Multi-disciplinary business expertise + Technology skills = Optimal solution to your business problem Recipient Microsoft MVP award 2000-2005 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refer to a hidden sheet using a macro.
just don't activate or try to select the hidden sheet
this copies data from sheet1 to sheet2 when sheet2 is hidden. Range("A1").Copy Sheets("Sheet2").Range("D3") edit the existing code and just reference the hidden sheet when you do your copying. -- Gary "fullers" wrote in message ... I have written a macro that will move data into a sheet that is hidden. However, when I run it I get the debugger message telling me it has failed. If I unhide the sheet and run it then it works fine. What is the best way round this? Thanks in advance. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refer to a hidden sheet using a macro.
"fullers" wrote: I have written a macro that will move data into a sheet that is hidden. However, when I run it I get the debugger message telling me it has failed. If I unhide the sheet and run it then it works fine. What is the best way round this? If it is in a macro, run a code to unhide the sheet and then once the work in this sheet hide it again. Substitute "hidden sheet" for your sheet Dim UNHIDESHEET Sheets("HiddenSheet").Visible = True Dim HIDESHEET Sheets("References").Visible = False Cheers Thanks in advance. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refer to a hidden sheet using a macro.
You can write to a hidden sheet, but I suspect your code has activates or
selections in it which will fail if the sheet is hidden. Post your code for someone to show you how to remove these. -- Regards, Nigel "Johno" wrote in message ... "fullers" wrote: I have written a macro that will move data into a sheet that is hidden. However, when I run it I get the debugger message telling me it has failed. If I unhide the sheet and run it then it works fine. What is the best way round this? If it is in a macro, run a code to unhide the sheet and then once the work in this sheet hide it again. Substitute "hidden sheet" for your sheet Dim UNHIDESHEET Sheets("HiddenSheet").Visible = True Dim HIDESHEET Sheets("References").Visible = False Cheers Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Assign Macro with Hidden Sheet | Excel Worksheet Functions | |||
Macro to run on hidden sheet | Excel Discussion (Misc queries) | |||
Using a Macro to look at Hidden Sheet | Excel Discussion (Misc queries) | |||
Can a macro format a hidden sheet? | Excel Discussion (Misc queries) | |||
Refer to Hidden Sheet from VBA? | Excel Programming |