Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VeryHideWorksheet With a Macro? .... or even normal hide?
Hi,
Can someone tell me how to VeryHide and also to make a worksheet visible again using VBA? If thats not possible can I just regular hide and unhide a worksheet using VBA? Thanks for any advice. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VeryHideWorksheet With a Macro? .... or even normal hide?
Sub hide_em()
Dim n As Single Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If Not ws.Name = "hoohah" Then ws.Visible = xlVeryHidden End If Next ws End Sub Sub unhide_em() Dim n As Single Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Visible = True Next ws End Sub To hide a single sheet or selected sheets............... Sub hidesome() ActiveWindow.SelectedSheets.Visible = xlVeryHidden End Sub Gord Dibben MS Excel MVP On Sat, 12 Apr 2008 11:01:01 -0700, dimm wrote: Hi, Can someone tell me how to VeryHide and also to make a worksheet visible again using VBA? If thats not possible can I just regular hide and unhide a worksheet using VBA? Thanks for any advice. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VeryHideWorksheet With a Macro? .... or even normal hide?
On Apr 12, 7:01*pm, dimm wrote:
Hi, Can someone tell me how to VeryHide and also to make a worksheet visible again using VBA? If thats not possible can I just regular hide and unhide a worksheet using VBA? Thanks for any advice. dimm, You can use the ActiveSheet.Visible = xlVeryHidden property, or you can also refer to sheets by name, for example: Sub HideSheet() Worksheets("Sheet1").Visible = xlVeryHidden End Sub Sub UnHideSheet() Worksheets("Sheet1").Visible = xlVisible End Sub You can then adapt this basic structure to meet your own needs. Alex |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VeryHideWorksheet With a Macro? .... or even normal hide?
Thanks folks,
Thats done it. :) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VeryHideWorksheet With a Macro? .... or even normal hide?
What is the reasoning of xlVeryHidden?
How does it differ from .Hide? wrote in message ... On Apr 12, 7:01 pm, dimm wrote: Hi, Can someone tell me how to VeryHide and also to make a worksheet visible again using VBA? If thats not possible can I just regular hide and unhide a worksheet using VBA? Thanks for any advice. dimm, You can use the ActiveSheet.Visible = xlVeryHidden property, or you can also refer to sheets by name, for example: Sub HideSheet() Worksheets("Sheet1").Visible = xlVeryHidden End Sub Sub UnHideSheet() Worksheets("Sheet1").Visible = xlVisible End Sub You can then adapt this basic structure to meet your own needs. Alex |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
VeryHideWorksheet With a Macro? .... or even normal hide?
xlVeryHidden does not show up in the Hide list, such as when you go to
Unhide a worksheet there is a list populated with all of the hidden sheets. veryhidden does not show up in that group, but it is visible in the VBIDE. -- Zack Barresse "R P" wrote in message ... What is the reasoning of xlVeryHidden? How does it differ from .Hide? wrote in message ... On Apr 12, 7:01 pm, dimm wrote: Hi, Can someone tell me how to VeryHide and also to make a worksheet visible again using VBA? If thats not possible can I just regular hide and unhide a worksheet using VBA? Thanks for any advice. dimm, You can use the ActiveSheet.Visible = xlVeryHidden property, or you can also refer to sheets by name, for example: Sub HideSheet() Worksheets("Sheet1").Visible = xlVeryHidden End Sub Sub UnHideSheet() Worksheets("Sheet1").Visible = xlVisible End Sub You can then adapt this basic structure to meet your own needs. Alex |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If Cell is Blank (Though a Link), Hide Result, Else Normal Font | Excel Worksheet Functions | |||
Can't run macro as normal user | Excel Programming | |||
Can't run macro as normal user | Excel Programming | |||
Can't run macro as normal user | Excel Programming | |||
How may I macro update a normal distribution chart from new data? | Charts and Charting in Excel |