Trying to shade cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Office 2003 and Windows XP;

I have a sheet containing some 50 rows of merged cells: "G12:H12";
"G13:H13", etc. note: G to H

I want to shade them using something like:

Range(msaGLADAddress(iX)).Interior.ColorIndex = 6

Where msaGLADAddress(iX) is a module level string array containing the
address: "G13:G54"; but I get an error: cannot set the color index. Is there
a way around this? How can I shade these cells without changing the cell
address in the array?

Thanks much.
 
Just make sure the argument of Range() is, in fact, a string and not a range.

try

MSGBOX(msaGLADAddress(iX)) first
 
You can't color the interior of a subset of cells within a merged set of
cells which it sounds like you are try to do. You can try this.


For each cell in Range(msaGLADAddress(iX))
cell.mergeArea.Interior.ColorIndex = 6
Next
 

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

Back
Top