Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Colin Hayes
 
Posts: n/a
Default Reducing & increasing tabs on display


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   Report Post  
Gary Brown
 
Posts: n/a
Default

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
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
Excel should display tabs on multiple rows Kevin M Excel Worksheet Functions 6 March 8th 05 10:51 PM
Hidding Tabs Aviator Excel Discussion (Misc queries) 1 December 15th 04 04:55 PM
Sheet tabs disappear sometimes in Internet Explorer Jan Nordgreen Excel Discussion (Misc queries) 0 December 6th 04 01:34 AM
Conditional display of a .jpeg file? sbhogle Excel Discussion (Misc queries) 2 November 30th 04 05:57 AM
Combine & Display “Fixed” & “Automatically Updated” Date Parts texcel Excel Worksheet Functions 1 November 1st 04 05:38 PM


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

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

About Us

"It's about Microsoft Excel"