hide sheet name/ Tab

C

CLR

Here's a macro toggle..........

Sub HideTabToggle()
If ActiveWindow.DisplayWorkbookTabs = True Then
ActiveWindow.DisplayWorkbookTabs = False
Else
ActiveWindow.DisplayWorkbookTabs = True
End If
End Sub


Vaya con Dios,
Chuck, CABGx3
 
G

Gord Dibben

Or this...........

Sub ToggleTabs()
With ActiveWindow
.DisplayWorkbookTabs = Not .DisplayWorkbookTabs
End With
End Sub


Gord Dibben MS Excel MVP
 
C

CLR

Cool Gord.........I don't understand it, but cool........

Vaya con Dios,
Chuck, CABGx3
 
G

Gord Dibben

Don't think I do either but..........<g>

The Not .whatever can be used to toggle many items.

With Selection
.WrapText = Not .WrapText
.Font.Bold = Not .Font.Bold
End With

Or simply

Selection.WrapText = Not Selection.WrapText


Gord
 
G

Gord Dibben

Each time you run the toggle the value becomes either true or false.

Whatever it is gets changed to the other value.

In Immediate Window type ?.DisplayWorkbookTabs to see either true or false

Run the toggle macro and value changes.


Gord
 
C

CLR

Slicker than all...........something for my goodie-stash for
sure..........thanks Gord

Vaya con Dios,
Chuck, CABGx3


Gord Dibben said:
Each time you run the toggle the value becomes either true or false.

Whatever it is gets changed to the other value.

In Immediate Window type ?.DisplayWorkbookTabs to see either true or false

Run the toggle macro and value changes.


Gord

Don't think I do either but..........<g>

The Not .whatever can be used to toggle many items.

With Selection
.WrapText = Not .WrapText
.Font.Bold = Not .Font.Bold
End With

Or simply

Selection.WrapText = Not Selection.WrapText


Gord


Cool Gord.........I don't understand it, but cool........

Vaya con Dios,
Chuck, CABGx3



"Gord Dibben" <gorddibbATshawDOTca> wrote in message
Or this...........

Sub ToggleTabs()
With ActiveWindow
.DisplayWorkbookTabs = Not .DisplayWorkbookTabs
End With
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top