Change tab colour for active sheet

  • Thread starter Helge V. Larsen
  • Start date
H

Helge V. Larsen

When a sheet is activated, its tab turns WHITE with a coloured underscore.
The underscore colour is equal to the tab colour when the sheet is not
active.

I want to control the colour of the active tab, for instance I would like to
make it RED instead of white. The active tab colour (e.g. red) should not be
individual, but common to all sheets. Is it in some way possible ?

(I use Excel 2003.)

Helge
 
G

Guest

Thsis simple macro will turn all tabs red

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/8/2007
'

'
For Each ws In Worksheets

Sheets(ws.Name).Tab.ColorIndex = 3
Next ws
End Sub
 
H

Helge V. Larsen

Perhaps I was not clear.

Let us suppose that all tabs are blue. Then I want the colour of any sheet
tab to turn RED when the sheet is activated.

Helge
 
G

Guest

If you add this code into the ThisWorkbook VBA sheet it will underline the
active sheet in Red and make all other tabs white

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
For Each ws In Worksheets

If ws.Name = ActiveSheet.Name Then
Sheets(ws.Name).Tab.ColorIndex = 3
Else
Sheets(ws.Name).Tab.ColorIndex = xlNone
End If
Next ws
End Sub
 
H

Helge V. Larsen

We are closer - but not at all close to the target.

What you suggest will only bring colour to the UNDERSCORE of the active
sheet's tab.
I am interested in colouring the WHOLE tab of the active sheet!

Helge
 
G

Guest

The active tab doesn't get colored, only underlined. Maybe the solution is
the revers. Color all the tab not active red and leave the other tabs
colored red. but isn't that whatt macrosoft already does?
 
G

Guest

The color of the selected tab is the same color as the worksheet when is has
no coloring. This is a Windows setting, not an excel setting. If you change
the background color for your windows in your windows settings, then you can
alter the tab color of the selected sheet. If you want what is currently
white to be red, then you can do it. <g>
 

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

Similar Threads


Top