Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Okay, I have one more question. Would it be possible to use th listbox_Click() and have each sheet that is hidden temporary unhide then hide? So, in other words, when clicking in the listbox, sheet that are set to hidden would unhide for viewing. I'm trying to clean u some clutter in a workbook by hidding all but one sheet. Some occasion I might need to view the hidden sheets. Thanks, Rocke -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why not have a commandbutton to unhide them all. You could store each that
you unhide in an array, and have another commandbutton to re-hide them. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rockee052 " wrote in message ... Hi, Okay, I have one more question. Would it be possible to use the listbox_Click() and have each sheet that is hidden temporary unhide, then hide? So, in other words, when clicking in the listbox, sheets that are set to hidden would unhide for viewing. I'm trying to clean up some clutter in a workbook by hidding all but one sheet. Some occasions I might need to view the hidden sheets. Thanks, Rockee --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
That sound good but I have not worked with an array before, I don' have a clue on how to set it up. :( Rocke -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rockee,
Here is some code for the two commandbuttons. I decided to use a collection not an array in the end. Dim collSheets As Collection Sub Unhide_Click() Dim sh As Worksheet Dim i As Long Dim c If collSheets Is Nothing Then Set collSheets = New Collection Else For i = 1 To collSheets.Count collSheets.Remove 1 Next End If For Each sh In ActiveWorkbook.Sheets If sh.Visible < xlSheetVisible Then collSheets.Add sh.Index, sh.Name sh.Visible = True End If Next sh End Sub Sub Hide_Click() Dim sh As Worksheet Dim i As Long If collSheets Is Nothing Then MsgBox "Error" Else For i = 1 To collSheets.Count Worksheets(collSheets(i)).Visible = False Next i End If End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rockee052 " wrote in message ... Bob, That sound good but I have not worked with an array before, I don't have a clue on how to set it up. :( Rockee --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rockee,
The one thing I didn't do was to cater for very hidden sheets. If you need that, you will need to amend slightly. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rockee052 " wrote in message ... Bob, That worked GREAT!!!! Thank you :) Rockee --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Visible Cells in Sheet with Merged and Hidden Cells | Excel Discussion (Misc queries) | |||
Workbook Open but not visible (and not HIDDEN?!?) | Excel Discussion (Misc queries) | |||
Populating listbox with sheet names | Excel Discussion (Misc queries) | |||
Problem pasting a row from a hidden sheet to the first free row on another visible sheet | Excel Programming | |||
Check status row (hidden or visible)? | Excel Programming |