Cell Interior Color

M

Mike H.

DataArray(Z, 2) = Cells(X, 1).Interior.ColorIndex
Cells(X, 1).Interior.ColorIndex = DataArray(Z, 2)

I go through a loop and if I execute both these lines on a cell, the
original cell color may be a light shade of purpose but after I set the color
to the same color, it is now a shade of gray! Why?
 
D

Dave Peterson

It didn't change appearance for me.

What was the colorindex when you started?

What version of excel are you using?

Are you sure that it isn't just that you selected the cell?
 
C

Chip Pearson

Your code works for me, once I wrapped some code around it. What
version of Excel are you using? You might want to post some compilable
code that illustrates the problem. Omit everything that is irrelevant,
and include code that reliably reproduces the problem.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 

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