Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Selecting Invisible worksheets

Is there a way to keep a worksheet invisible yet be able to select it in the
code. I know I can set and use the cells on an invisible sheet, but it
doesn't appear that I can SELECT it [sheets("ratsafrats").select or
sheet4.select]. I have a number of sheets that will just be an annoyance to
the user but they are needed by the code(such as templates, database,...).

Any thoughts would be appreciated.

ken


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Selecting Invisible worksheets

Hi Ken,

A hidden sheet cannot be selected.

However, selections are rarely necessary or desirable. Most sheet
manipulation can be effected without unhiding or selecting the sheet.

If you experience any problem in rewriting your code to remove unnecessary
selections, post back with the relevant code.


---
Regards,
Norman



"Ken Soenen" wrote in message
...
Is there a way to keep a worksheet invisible yet be able to select it in
the code. I know I can set and use the cells on an invisible sheet, but it
doesn't appear that I can SELECT it [sheets("ratsafrats").select or
sheet4.select]. I have a number of sheets that will just be an annoyance
to the user but they are needed by the code(such as templates,
database,...).

Any thoughts would be appreciated.

ken



  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Selecting Invisible worksheets

It's uncommon to have to select or activate a sheet to work with it, so most
of the actions performed with a sheet can be done regardless of whether or
not it's hidden (although I've never figured out how to print a hidden sheet
without unhiding it first).

If you have to have the sheet unhidden, you could change the visible
property at the beginning and end of your code.

Worksheets("Sheet1").Visible = xlsheetvisible
your code
Worksheets("Sheet1").Visible = xlsheethidden

or you can assign the visible property value to a variable, make the sheet
visible, work with the sheet, then set the visible property equal to the
variable. This way the visible status of the sheet is just whatever it was
before your code executed.

VisibleState = Worksheets("Sheet1").Visible
Worksheets("Sheet1").Visible = xlsheetvisible
your code
Worksheets("Sheet1").Visible = VisibleState

"Ken Soenen" wrote:

Is there a way to keep a worksheet invisible yet be able to select it in the
code. I know I can set and use the cells on an invisible sheet, but it
doesn't appear that I can SELECT it [sheets("ratsafrats").select or
sheet4.select]. I have a number of sheets that will just be an annoyance to
the user but they are needed by the code(such as templates, database,...).

Any thoughts would be appreciated.

ken



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
Controls in all worksheets are suddenly invisible Sabba Excel Discussion (Misc queries) 1 October 28th 06 01:51 AM
Selecting across worksheets JMS Excel Discussion (Misc queries) 1 July 14th 05 10:44 PM
Worksheet Exists? Invisible Worksheets? Ken Loomis Excel Programming 1 July 1st 05 01:25 AM
Selecting WorkSheets Jordan Excel Programming 3 February 25th 05 07:10 PM
selecting worksheets Matthew Kramer Excel Programming 1 August 16th 04 10:39 PM


All times are GMT +1. The time now is 07:38 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"