Change Worksheet Tab Colors

March 5, 2009 by vba excel
Filed under: Excel Vba 
Sponsor

Excel Vba Question:

I’m using the following code to clear or change worksheet tab colors from a worksheet tab but unfortunately i am getting an error “Subscript out of range” error:
Sheets(”aaaDetail”).Range(”$A$1″).Select
Sheets(”aaaDetail”).Tab.ColorIndex = xlAutomatic

The first statement selects cell A1 is fine, but the second is errors.

Excel Vba Answer:

This excel vba change worksheet tab colors :

From

Sheets(”aaaDetail”).Tab.ColorIndex = xlAutomatic

To

Sheets(”aaaDetail”).Tab.ColorIndex = -4142

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • E-mail this story to a friend!
  • Live
  • MisterWong
  • Propeller
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb
  • Print this article!

Rate This Tips:

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...


Incoming excel search terms

excel vba change tab color,vba tab color,excel vba tab color,excel tab colorindex,excel vba worksheet tab color,worksheet color vba,excel tab color formula,excel change tab color based on cell value,excel tab color based on cell,excel vba tab colorindex,vba change worksheet tab color,vba worksheet tab,2007 vba worksheet copy tab color,change tab color excel macro,change tab color excel vba,color code worksheet name in microsoft excel based on values in the worksheet,color tabs in vba,excel default tab color vba,excel macro changing tab colors,excel tab color based on cell value,excel tab color macro,excel vb change tab color,excel vb range from a different tab,excel vba add tab,excel vba add tab color,excel vba change worksheet tab color,excel vba clear tab color,excel vba colorindex tabs,excel vba sheet tab color,excel vba tab color active sheet,excel vba tab colorindex=xlautomatic,how to put date in tab in excel,select coloured tabs excel vba macro,tab colorindex,vb excel change tab color,vb remove tab color,vba change worksheet color,vba color sheet,vba color tab suscript ouot of range,vba excel tab color,vba excel worksheet color,vba tab colorindex,vba worksheet color,1,2007 vba worksheet tab colorindex subscript out of range,activate tab color excel,active worksheet tab color vba,activeworksheet,add a tab color when selected using vba in excel,after sheet activate



Related Excel Tips

Comments

Have another excel answer or questions for this problem ?
Feel free to post it here..