Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default referencing hidden sheets

Hi, I have three sheets that I do some calculations in. I wrote a form
which provides a single input place for all of the sheets, but I cannot
hide my sheets. Everytime I hide them, so the user only sees the form,
the "sheet (x).select" will cause a compile error because it cannot find
the hidden sheet. Any suggestions, please?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default referencing hidden sheets

mohsen,
If you think about it, that makes sense. If an object is hidden, it cannot
be selected.
Most of Excel's functionality does not require you to select an object.
Obviously you cannot then use Selection, but change these to their Excel
objects.

NickHK

"mohsen" wrote in message
...
Hi, I have three sheets that I do some calculations in. I wrote a form
which provides a single input place for all of the sheets, but I cannot
hide my sheets. Everytime I hide them, so the user only sees the form,
the "sheet (x).select" will cause a compile error because it cannot find
the hidden sheet. Any suggestions, please?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default referencing hidden sheets


In VBA most of the time you do not require to use sheet.select. Without
this you can do almost all the tasks. But if it is inevitable to show a
hidden sheet, then use:

Sheet(x).visible = true
Sheet(x).select

And after your operation is over
Sheet(x).visible = false


Hi, I have three sheets that I do some calculations in. I wrote a form
which provides a single input place for all of the sheets, but I
cannot
hide my sheets. Everytime I hide them, so the user only sees the form,
the "sheet (x).select" will cause a compile error because it cannot
find
the hidden sheet. Any suggestions, please?



Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=375140

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default referencing hidden sheets

Hi

....
varX=Worksheets("YourHiddenSheet").Range("A1").Val ue
Worksheets("YourHiddenSheet").Range("A1").Value=va rY
etc.


--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )


"mohsen" wrote in message
...
Hi, I have three sheets that I do some calculations in. I wrote a form
which provides a single input place for all of the sheets, but I cannot
hide my sheets. Everytime I hide them, so the user only sees the form,
the "sheet (x).select" will cause a compile error because it cannot find
the hidden sheet. Any suggestions, please?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default referencing hidden sheets

If you turn off ScreenUpdating before the operation, and back on
afterwards, then the user won't see that there's a hidden sheet.
Truthfully though, even with screenupdating on most operations happen
so fast that the user wouldn't detect them anyway.

Application.ScreenUpdating = False
ActiveWorkbook.Sheets("YourHiddenSheet").Visible = True
'
' Your actions here
'
ActiveWorkbook.Sheets("YourHiddenSheet").Visible = False
Application.ScreenUpdating = True



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
Hidden rows/columns expand when referencing cells? tink Excel Worksheet Functions 1 October 9th 08 08:48 PM
Referencing sheets Techclerk Excel Discussion (Misc queries) 4 May 26th 08 12:25 AM
When referencing other Sheets JT Excel Discussion (Misc queries) 1 March 14th 07 05:36 PM
How do I avoid referencing hidden values in formulas like OFFSET? K Excel Worksheet Functions 2 July 14th 06 08:46 PM
referencing sheets libby Excel Programming 2 January 23rd 04 04:51 PM


All times are GMT +1. The time now is 01:53 AM.

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

About Us

"It's about Microsoft Excel"