A
Agoston Bejo
Hi,
is there a way to programmatically change the background color of a cell
using Excel ActiveX object? Every example on the internet I have found uses
the ColorIndex attribute and hardwired numbers, which gets on my nerves.
I have tried to set the Range.Interior.Color attribute with 'Red', then with
'RGB(15,52,20)' then with '=RGB(16,78,60)' but I constantly get an error
message that says: "Unable to set the Color property of the Interior class".
Note that I'm using the Excel ActiveX objects in JavaScript, not VBA.
Even if I have to use the ColorIndex property, I don't like the idea that I
have to determine the actual colors corresponding to the ColorIndex values
by experimenting. (There's no related constants available in JavaScript, as
far as I know.)
Please help!
is there a way to programmatically change the background color of a cell
using Excel ActiveX object? Every example on the internet I have found uses
the ColorIndex attribute and hardwired numbers, which gets on my nerves.
I have tried to set the Range.Interior.Color attribute with 'Red', then with
'RGB(15,52,20)' then with '=RGB(16,78,60)' but I constantly get an error
message that says: "Unable to set the Color property of the Interior class".
Note that I'm using the Excel ActiveX objects in JavaScript, not VBA.
Even if I have to use the ColorIndex property, I don't like the idea that I
have to determine the actual colors corresponding to the ColorIndex values
by experimenting. (There's no related constants available in JavaScript, as
far as I know.)
Please help!