Hiding Tabs


Posted by Mike K on July 28, 2000 7:51 AM

Is there a way to hide tabs. Is there code for it i can put into a macro. What about hiding just specific tabs and not all tabs????????
' THANKS!!

Posted by JAF on July 28, 0100 8:14 AM


Mike

The code you need is:
Sheets("Sheet Name").Visible = False

or Sheets("Sheet Name").Visible = True when you want to see the sheet again.


JAF

Posted by Ada on July 28, 0100 8:23 AM


Mike

To hide all tabs in a workbook :-
ActiveWindow.DisplayWorkbookTabs = False

To show all tabs in a workbook :-
ActiveWindow.DisplayWorkbookTabs = True

Other than hiding the whole of a sheet, don't know of a way to hide only the tab for a particular sheet.

Ada


Posted by Ivan Moala on July 28, 0100 1:06 PM

To hide ALL tabs except for 1 (You must have 1 visible anyway)
Use this;

Sub SelectAll_BarOne_Hide()
Dim Sht
'Select all sheets Bar 1
For Each Sht In ThisWorkbook.Sheets
If Sht.Name <> "Your Tab name" Then
Sht.Select False
End If
Next
On Error GoTo ErrHide
ActiveWindow.SelectedSheets.Visible = False
Exit Sub
ErrHide:
MsgBox Err.Number & " : " & Err.Description
End Sub

Ivan



Posted by Ivan Moala on July 28, 0100 1:33 PM

Woops !!!
I misread that question, sorry, was reading
it as a sheet!!

Ivan