Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
I'm getting the following error and do not understand why, so I'd appreciate any insight you might be able to provide. Run-time error 1004: Unable to set the ColorIndex property of the Font class. This error occurs in a routine that looks like this (with some irrelevant code removed for clarity): Sub SetTablesValidStatus() Set rngCell = ActiveWorkbook.Names("Model_RTable_StatusMsg").Ref ersToRange rngCell.Value = " Update Needed <<<" rngCell.Font.ColorIndex = 3 ' <-- error occurs here End Sub This SetTablesValidStatus routine lives in the code space of a sheet called "Power Model" and when operations on that sheet end up invoking that routine, everything works fine (i.e. no error while setting the ColorIndex property). The problem occurs when I end up in SetTableValidStatus through actions on another sheet that cascade through to the Power Model sheet. (Both sheets are in the same workbook.) Why would I not be able to set the ColorIndex property in the latter case? Even though the Power Model sheet is not the active sheet at that time, the target cell still exists (i.e. the cell named Model_RTable_StatusMsg) and it has a Font.ColorIndex property regardless of whether it's visible. I'm working in Excel 2002 with SP3 installed. Again, I'd appreciate any tips you can provide. Thank you. Wolf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to set the XValues Property | Charts and Charting in Excel | |||
Unable to set Hidden Property | Excel Programming | |||
ColorIndex property XL2000 vs 2003 | Excel Programming | |||
unable to set the colorindex property of the font class | Excel Programming | |||
Unable to set the colorIndex Property of the Interior Class Error | Excel Programming |