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 tab color formula,excel tab colorindex,excel vba tab color,excel vba worksheet tab color,worksheet color vba,vba worksheet tab,change tab color excel macro,color tabs in vba,excel change tab color based on cell value,excel default tab color vba,excel tab color based on cell value,excel vb change tab color,excel vb range from a different tab,excel vba add tab,excel vba clear 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,vb remove tab color,vba excel worksheet color,vba tab colorindex,1,activate tab color excel,add a tab color when selected using vba in excel,after sheet activate,assign colors to new worksheets vba,assigning colours in vba,change color excel vba,change color of a sheet based on another cell,change color of tab name in excel,change color of worksheet excel vba,change color vba,change default tab color in excel,change sheet tabs text in excel vba,change tab color according to sheet results excel,change tab color after sheet activate excel,change tab color based on cell,change tab color based on cell value,change tab color depending on cell value,change tab color depending on date in excel,change tab color excel vba,change tab color in excel based on cell,change tab color in excel vbs,change tab color with macro,change tab colour based on cell value,change tab to clear vba,change tab vba excel



Related Excel Tips

Comments

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