ColorIndex property XL2000 vs 2003
Hi Harald,
I have no idea on 2003 as I don't have it, but automatic is -4105 on XL200
in front of me.
Bob
"Harald Staff" wrote in message
...
Hi Bob
0 is "automatic", used by fonts, opposed to "none" for interior, which
is -4142. Recording those actions said the same in 2000 and 2003:
Sub Macro2()
Range("A2").Select
Selection.Interior.ColorIndex = xlNone
Selection.Font.ColorIndex = 0
End Sub
Best wishes Harald
"Bob Phillips" skrev i melding
...
Mark,
There is no colorindex of 0, so I guess 2003 has just tightened up.
Try
Range(cell_dest).Font.ColorIndex = xlColorindexAutomatic
if using the Interior property, use xlColorindexNone.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"MarkT" wrote in message
...
I have recently upgraded from Office 2000 to 2003 Pro. I have a
spreadsheet
containing VBA code that halts when run in 2003 with the following
'unexpected error':
Unable to set the ColorIndex property of the Font class
Code execution then stops. Here is the offending code line
Range(cell_dest).Font.ColorIndex = 0
I have tried changing the value to no effect and cannot find anything
about
this error anywhere in the KB or newsgroups. Using VBA 6.3 in both
2000
and
2003 setups.
Any ideas anyone - this spreadsheet is critical to my work!
Tks
Mark
|