Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default VeryHideWorksheet With a Macro? .... or even normal hide?

Thanks folks,

Thats done it. :)
  #5   Report Post  
Posted to microsoft.public.excel.programming
R P R P is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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
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
If Cell is Blank (Though a Link), Hide Result, Else Normal Font Mary Excel Worksheet Functions 5 December 23rd 08 06:22 PM
Can't run macro as normal user Henrik Christiansen Excel Programming 3 February 15th 07 04:02 PM
Can't run macro as normal user Henrik Christiansen Excel Programming 1 February 15th 07 03:06 PM
Can't run macro as normal user Joel Excel Programming 0 February 15th 07 02:50 PM
How may I macro update a normal distribution chart from new data? Mike Williams Charts and Charting in Excel 4 September 11th 06 01:20 PM


All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"