Change worksheet tab colors failing

J

John

I'm using the following code to clear the colors from a worksheet tab and am
getting a "Subscript out of range" error:
Sheets("aaaDetail").Range("$A$1").Select
Sheets("aaaDetail").Tab.ColorIndex = xlAutomatic

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

I appreciate your help, -John
 
J

Joel

from
Sheets("aaaDetail").Tab.ColorIndex = xlAutomatic
to
Sheets("aaaDetail").Tab.ColorIndex = -4142
 

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