Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
hiding worksheets programmatically
I have an inherited workbook that when it is all done running the scenarios,
etc, there are a extra sheets. These have the standard "Sheet" + number on the tab while those reviewed and needed are actually named. I would like to hide these unused sheets at the end of the running process. But I am at a loss of how that would be accomplished, so I seek help from the group. Thanks. .... John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hiding worksheets programmatically
Click on the sheet tab to activate it, then
FormatSheetHide "JohnE" wrote: I have an inherited workbook that when it is all done running the scenarios, etc, there are a extra sheets. These have the standard "Sheet" + number on the tab while those reviewed and needed are actually named. I would like to hide these unused sheets at the end of the running process. But I am at a loss of how that would be accomplished, so I seek help from the group. Thanks. ... John |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
hiding worksheets programmatically
That I know. I need to use code to hide them. The number of the sheets will
vary from run to run. .... John "JLGWhiz" wrote: Click on the sheet tab to activate it, then FormatSheetHide "JohnE" wrote: I have an inherited workbook that when it is all done running the scenarios, etc, there are a extra sheets. These have the standard "Sheet" + number on the tab while those reviewed and needed are actually named. I would like to hide these unused sheets at the end of the running process. But I am at a loss of how that would be accomplished, so I seek help from the group. Thanks. ... John |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
hiding worksheets programmatically
you can try these
worksheets("Sheet1").visible = false worksheets("Sheet1").visible = true worksheets("Sheet1").visible = xlveryhidden -- Gary "JohnE" wrote in message ... I have an inherited workbook that when it is all done running the scenarios, etc, there are a extra sheets. These have the standard "Sheet" + number on the tab while those reviewed and needed are actually named. I would like to hide these unused sheets at the end of the running process. But I am at a loss of how that would be accomplished, so I seek help from the group. Thanks. ... John |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
hiding worksheets programmatically
Will the sheets you are not hiding always have similar
characteristics? Do these sheets have anything you need? You might delete them too. Perhaps you could adapt this Sub HideSheets() For Each ws In Worksheets If Left(ws.Name, 5) = "Sheet" Then ws.Visible = False Next ws End Sub Scott On Thu, 21 Feb 2008 12:56:02 -0800, JohnE wrote: I have an inherited workbook that when it is all done running the scenarios, etc, there are a extra sheets. These have the standard "Sheet" + number on the tab while those reviewed and needed are actually named. I would like to hide these unused sheets at the end of the running process. But I am at a loss of how that would be accomplished, so I seek help from the group. Thanks. ... John |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
hiding worksheets programmatically
You said these were extra sheets. I assumed they were unnecessary and you
just wanted them out of the way. If they were created by the macro during the execution and are used somewhere along the line, then you will need to think about how you are going to handle this situation. Will the macro create new sheets each time or will you just unhide the sheets. Since you did not specify how the extra sheets came into existence and what, if any, significance they have in the execution of the macro, maybe Gary's posting offers the best information. "JohnE" wrote: That I know. I need to use code to hide them. The number of the sheets will vary from run to run. ... John "JLGWhiz" wrote: Click on the sheet tab to activate it, then FormatSheetHide "JohnE" wrote: I have an inherited workbook that when it is all done running the scenarios, etc, there are a extra sheets. These have the standard "Sheet" + number on the tab while those reviewed and needed are actually named. I would like to hide these unused sheets at the end of the running process. But I am at a loss of how that would be accomplished, so I seek help from the group. Thanks. ... John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting a Worksheets Codename to a variable programmatically | Excel Programming | |||
Hiding worksheets | Excel Programming | |||
Retrieving list of worksheets programmatically | Excel Programming | |||
Hiding rows programmatically | Excel Programming | |||
Programmatically addressing worksheets - painfully stupid question | Excel Programming |