Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Controls in all worksheets are suddenly invisible | Excel Discussion (Misc queries) | |||
Selecting across worksheets | Excel Discussion (Misc queries) | |||
Worksheet Exists? Invisible Worksheets? | Excel Programming | |||
Selecting WorkSheets | Excel Programming | |||
selecting worksheets | Excel Programming |