Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just make sure the argument of Range() is, in fact, a string and not a range.
try MSGBOX(msaGLADAddress(iX)) first -- Gary''s Student - gsnu200739 "XP" wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Regards, Tom Ogilvy "XP" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
shade one cell that will shade multiple cells | Excel Discussion (Misc queries) | |||
How to change shade of cells when selecting multiple cells | Excel Discussion (Misc queries) | |||
Easy way to shade cells | Excel Discussion (Misc queries) | |||
shade cells | Excel Discussion (Misc queries) | |||
How do I shade cells using the "IF" function? | Excel Worksheet Functions |