Worksheets Tabs

G

Guest

Hi
I want to change the color of the worksheet tabs like different tab color
for different sheet
Is there any way i can do this by writing a VBA code.
Thanks
 
G

Guest

If you're using XL XP or later, just right-click the tab to select a color.
If you're using an earlier version of Excel, you can't color the tabs.

Dave
 
G

Guest

Hi Dave
I have Excel 2000 version
Thanks

Dave F said:
If you're using XL XP or later, just right-click the tab to select a color.
If you're using an earlier version of Excel, you can't color the tabs.

Dave
 
G

Gord Dibben

Private Sub Color_Tabs()
Dim i As Integer
Dim ws As Worksheet
For i = 1 To Worksheets.Count
Set ws = Worksheets(i)
ws.Tab.ColorIndex = i
Next i
End Sub

Note: you are limited to the 56 colors Excel's palette provides.


Gord Dibben MS Excel MVP
 
G

Guest

Hi
The code editor gives error on line
ws.tab.colorindex = i
The error is complie erroe
"Method or data member not found"
Please advise
 
G

Guest

The macro does not work because you have Excel 2000. As indicated
previously, it is impossible to color the tabs in Excel 2000, whether by a
built-in feature or else via macros. It simply cannot be done.

Dave
 
G

Guest

Hi Dave
Thanks for yr help.
Regards

Dave F said:
The macro does not work because you have Excel 2000. As indicated
previously, it is impossible to color the tabs in Excel 2000, whether by a
built-in feature or else via macros. It simply cannot be done.

Dave
 
C

Conan Kelly

ub,

You mentioned earlier that you are using XL 2000. You can't color sheet
tabs in 2000, not even with code.

You have to be using XL 2002 (XP) or later in order to color sheet tabs,
whether it be manual or with code.

Sorry,

Conan Kelly
 
D

David McRitchie

As an alternative for Excel 2000 -- no coloring of tabs.

I believe the normal reason to color tabs is to provide an organization to them. You can sort sheet tabs with a macro. You can
enhance your sorted arrangement by preceding the sheet tab with some less conspicuous small letters prefixes. i.e.
k.FunctKeys, k.ShortCutKeys
If working with dates for sheetnames, spell the year out and place it first
2002-10, 2002-11, 2002-12, 2003-01
sort sheet tabs into alphabetical order in http://www.mvps.org/dmcritchie/excel/buildtoc.htm#sortallsheets
 

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