Colour Tab when selected

rhombus4

Well-known Member
Joined
May 26, 2010
Messages
586
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a lot of tabs and sometimes it is difficult to see clearly which tab is highlighted

Any idea of a code where I could add which would make the colour of the tab selected a colour, doesnt really matter which colour just so it is easy to identify which tab the user is on

Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try this: press ALT + F11 to open the Visual Basic Editor, in the Project window double click ThisWorkbook and paste in

Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim i As Long
For i = 1 To Me.Worksheets.Count
    Sheets(i).Tab.Color = xlNone
Next i
Sh.Tab.Color = RGB(255, 0, 0)
End Sub

N.B. this will only work in Excel XP and later.
 
Upvote 0
The tab of the selected sheet is white. You can right-click the other tabs and make them most any color you like.
 
Upvote 0
Try this: press ALT + F11 to open the Visual Basic Editor, in the Project window double click ThisWorkbook and paste in

Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim i As Long
For i = 1 To Me.Worksheets.Count
    Sheets(i).Tab.Color = xlNone
Next i
Sh.Tab.Color = RGB(255, 0, 0)
End Sub

N.B. this will only work in Excel XP and later.

Thankyou :)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top