Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign Macro with Hidden Sheet Pran Excel Worksheet Functions 5 August 4th 09 01:32 PM
Macro to run on hidden sheet Tel Excel Discussion (Misc queries) 4 June 26th 09 09:08 PM
Using a Macro to look at Hidden Sheet alice Excel Discussion (Misc queries) 7 April 20th 07 09:16 AM
Macro Error When Connecting to Hidden Sheet Wuddus Excel Discussion (Misc queries) 5 August 3rd 06 03:34 PM
Can a macro format a hidden sheet? Robert Excel Discussion (Misc queries) 1 February 9th 05 06:13 PM


All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"