Range("A1").Interior.ColorIndex=xyz does not work

I

iwl

Hello Group,

I try to set Cell Background-Color with
Range("A1").Interior.ColorIndex=xyz
but does not work while I can read out the value
and it is different when I set it with Cell Format
in Excel manualy if I set it from vba it isn't so
red back again
 
J

Jim Thomlinson

What do you mean by does not work. Does it throw an error or does it just not
do anything. Since you do not specify a worksheet in the code line are you
sure it is acting on the correct worksheet???

Worksheets("Sheet1").Range("A1").Interior.ColorIndex=34
might fix your problem.
 

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