Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]() Hi I have a worksheet with many tabs along the bottom. To keep the display neat and accessible , and for security reason , I'd like to sometimes hide / unhide the tabs one-by-one. I'd like to put 2 buttons one my first page. One button with each click would hide the last tab in the row one-by-one , the other button would unhide them one-by-one. Is this possible? Grateful for any help Drno |
#2
![]() |
|||
|
|||
![]()
Here are the 2 macros, now attach them to buttons.
HTH, Gary Brown '/=================================================/ Public Sub HideEm() Dim i As Long Dim iWkshtCount As Long On Error GoTo err_Sub iWkshtCount = Application.Worksheets.Count If iWkshtCount 1 Then For i = iWkshtCount To 1 Step -1 If Worksheets(i).Visible = xlSheetVisible Then Worksheets(i).Visible = xlSheetHidden Exit For End If Next i End If exit_Sub: Exit Sub err_Sub: GoTo exit_Sub End Sub '/=================================================/ Public Sub UnhideEm() Dim i As Long Dim iWkshtCount As Long On Error GoTo err_Sub iWkshtCount = Application.Worksheets.Count If iWkshtCount 1 Then For i = 1 To iWkshtCount 'do not process very hidden worksheets If Worksheets(i).Visible = xlSheetHidden Then Worksheets(i).Visible = xlSheetVisible Exit For End If Next i End If exit_Sub: Exit Sub err_Sub: GoTo exit_Sub End Sub '/=================================================/ "Colin Hayes" wrote: Hi I have a worksheet with many tabs along the bottom. To keep the display neat and accessible , and for security reason , I'd like to sometimes hide / unhide the tabs one-by-one. I'd like to put 2 buttons one my first page. One button with each click would hide the last tab in the row one-by-one , the other button would unhide them one-by-one. Is this possible? Grateful for any help Drno |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel should display tabs on multiple rows | Excel Worksheet Functions | |||
Hidding Tabs | Excel Discussion (Misc queries) | |||
Sheet tabs disappear sometimes in Internet Explorer | Excel Discussion (Misc queries) | |||
Conditional display of a .jpeg file? | Excel Discussion (Misc queries) | |||
Combine & Display “Fixed” & “Automatically Updated” Date Parts | Excel Worksheet Functions |