Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2008

Tip: Looking for answers? Try searching our database.

VeryHideWorksheet With a Macro? .... or even normal hide?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dimm - 12 Apr 2008 19:01 GMT
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.
Gord Dibben - 12 Apr 2008 19:18 GMT
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

>Hi,
>
[quoted text clipped - 5 lines]
>
>Thanks for any advice.
simmo13@gmail.com - 12 Apr 2008 19:20 GMT
> Hi,
>
[quoted text clipped - 5 lines]
>
> 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
dimm - 12 Apr 2008 19:47 GMT
Thanks folks,

Thats done it. :)
R P - 14 Apr 2008 04:00 GMT
What is the reasoning of xlVeryHidden?
How does it differ from .Hide?

On Apr 12, 7:01 pm, dimm <d...@discussions.microsoft.com> wrote:
> Hi,
>
[quoted text clipped - 5 lines]
>
> 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
Zack Barresse - 22 Apr 2008 23:24 GMT
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.

Signature

Zack Barresse

> What is the reasoning of xlVeryHidden?
> How does it differ from .Hide?
[quoted text clipped - 27 lines]
>
> Alex
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.