Link to home
Start Free TrialLog in
Avatar of Sheldon Livingston
Sheldon LivingstonFlag for United States of America

asked on

Use Excel VBA to turn tab white

Please complete this line of code to turn a tab white:

Worksheet.Tab.Color = ???

for example

Worksheet.Tab.Color = 255

will turn the tab red
Avatar of Saurabh Singh Teotia
Saurabh Singh Teotia
Flag of India image

Use this one...

with Worksheet.Tab
 .ThemeColor = xlThemeColorDark1
        .TintAndShade = 0
    End With
 

Open in new window

try to use this one
Sub example()
   'Add color to the tab for "Sheet1"
   Sheets("Sheet1").Tab.Color = RGB(255, 0, 0)
End Sub

Open in new window

Avatar of Sheldon Livingston

ASKER

Figured it out...

Worksheet.Tab.Color = RGB(255, 255, 255)

This will turn a tab white.
I've requested that this question be closed as follows:

Accepted answer: 0 points for classnet's comment #a40848369

for the following reason:

Figured out myself
ASKER CERTIFIED SOLUTION
Avatar of helpfinder
helpfinder
Flag of Slovakia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This answer lead me to the solution...
You can also use , much easier to remember. Also, vbRed, vbBlue etc.

ActiveSheet.Tab.Color = vbWhite

Open in new window