Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro dependent on hidden sheet?
I've written a Macro which returns information held in a sheet I now want to
hide (I dont want anyone messing about with the data!) But when I hide the sheet the macro can no longer find the information and says there is a runtime error! Any ideas how I can get it to look up the information from this hidden sheet? Cheers |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro dependent on hidden sheet?
I can read data from a hidden sheet, so it must be something else.
Show us the full code. -- HTH RP "Cee_Pritchard" wrote in message ... I've written a Macro which returns information held in a sheet I now want to hide (I dont want anyone messing about with the data!) But when I hide the sheet the macro can no longer find the information and says there is a runtime error! Any ideas how I can get it to look up the information from this hidden sheet? Cheers |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro dependent on hidden sheet?
It should work. For example this works fine! Dim SH As Worksheet Set SH = ActiveSheet SH.Visible = xlSheetVeryHidden Debug.Print SH.Range("A1") SH.Visible = xlSheetVisible or is it another way you do it? -- Nicke ------------------------------------------------------------------------ Nicke's Profile: http://www.excelforum.com/member.php...fo&userid=2930 View this thread: http://www.excelforum.com/showthread...hreadid=269533 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro dependent on hidden sheet?
Yeah Oddly enough I tried it again after changing some ".Select" commands to
".activate" and it's working perfectly now!!! Thanks for replying tho! "Bob Phillips" wrote: I can read data from a hidden sheet, so it must be something else. Show us the full code. -- HTH RP "Cee_Pritchard" wrote in message ... I've written a Macro which returns information held in a sheet I now want to hide (I dont want anyone messing about with the data!) But when I hide the sheet the macro can no longer find the information and says there is a runtime error! Any ideas how I can get it to look up the information from this hidden sheet? Cheers |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro dependent on hidden sheet?
assume the hidden sheet name is "ABCD"
then set rng = Worksheets("ABCD").Range("A1").Value msgbox rng.Address(external:=True) & " - value: " & rng.Value Worksheets("ABCD").Activate Range("A1").Select msgbox Selection.Value won't work. -- Regards, Tom Ogilvy "Cee_Pritchard" wrote in message ... I've written a Macro which returns information held in a sheet I now want to hide (I dont want anyone messing about with the data!) But when I hide the sheet the macro can no longer find the information and says there is a runtime error! Any ideas how I can get it to look up the information from this hidden sheet? Cheers |
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) | |||
Macro Error When Connecting to Hidden Sheet | Excel Discussion (Misc queries) | |||
Can a macro format a hidden sheet? | Excel Discussion (Misc queries) |