![]() |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 12:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com