Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Change tab colour for active sheet

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Change tab colour for active sheet

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


"Helge V. Larsen" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Change tab colour for active sheet

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


"Joel" wrote in message
...
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


"Helge V. Larsen" wrote:

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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Change tab colour for active sheet

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

"Helge V. Larsen" wrote:

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


"Joel" wrote in message
...
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


"Helge V. Larsen" wrote:

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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Change tab colour for active sheet

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

"Joel" wrote in message
...
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

"Helge V. Larsen" wrote:

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


"Joel" wrote in message
...
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


"Helge V. Larsen" wrote:

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










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Change tab colour for active sheet

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?

"Helge V. Larsen" wrote:

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

"Joel" wrote in message
...
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

"Helge V. Larsen" wrote:

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


"Joel" wrote in message
...
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


"Helge V. Larsen" wrote:

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









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Change tab colour for active sheet

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

--
Regards,
Tom Ogilvy

"Helge V. Larsen" wrote:

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

"Joel" wrote in message
...
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

"Helge V. Larsen" wrote:

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


"Joel" wrote in message
...
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


"Helge V. Larsen" wrote:

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









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
How I can change colour of row and column which are active ? hb Excel Discussion (Misc queries) 1 September 18th 06 01:49 PM
On a Mac how do I change the border colour of the active cell? Lino Excel Discussion (Misc queries) 2 May 23rd 06 01:36 PM
Change Sheet Tab Colour Jenai Excel Discussion (Misc queries) 1 April 22nd 05 06:12 PM
Change Sheet "TAB" colour? Kane New Users to Excel 5 December 30th 04 12:41 PM
change active sheet Maileen Excel Programming 2 November 8th 04 08:15 PM


All times are GMT +1. The time now is 07:05 PM.

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"