Application-defined or Object-defined-error when changing color in

B

BCP

I have tried the following different approaches to chaning the background
color of a cell in an Excell 2007 VBA module and have gotten
Application-defined or Object-defined-error each time. I can display the
color value I just can't seem to be able to change it.

Sheet1.Cells(1, 2).Interior.Color = RGB(126, 255, 126)
Worksheets("sheet1").Cells("A1").Interior.ColorIndex = 3
ActiveSheet.Cells(Cell).Interior.ColorIndex = 255
Range("A1").Cells.Interior.ColorIndex = 1

Any help is welcomed.

Thank you in advance for your help.
 

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