R
Ricardo Dias Marques
Hi all,
I am using Visio Professional 2003 SP1 (in Windows XP Professional).
I'm writing a VBA Macro that (among other things) sets the Fill Foreground
of a shape.
Everything works well if I write my statement like this (16 = the color gray):
objShape.Cells("Fillforegnd") = 16
.... But I'm having problems when trying to set the value to an HSL (Hue,
Saturation, Lightness) reference.
I have tried writing:
objShape.Cells("FillForegnd").Formula = "HSL(144, 116, 225)"
.... but that returns an error message:
" Run-Time error '-2032466667 (86db0515)':
Syntax error: bad fraction."
I get the same error if I add an "equal sign" before "HSL":
objShape.Cells("FillForegnd").Formula = "=HSL(144, 116, 225)"
The numbers (144, 116, 225) should be correct (I'm copying them from the
FillForegnd cell of the "Fill Format" section from the ShapeSheet of another
shape).
Could anyone tell me what I'm doing wrong, please?
Thanks in advance!
Best wishes,
Ricardo Dias Marques
newsgroup DOT poster AT hotmail DOT com
I am using Visio Professional 2003 SP1 (in Windows XP Professional).
I'm writing a VBA Macro that (among other things) sets the Fill Foreground
of a shape.
Everything works well if I write my statement like this (16 = the color gray):
objShape.Cells("Fillforegnd") = 16
.... But I'm having problems when trying to set the value to an HSL (Hue,
Saturation, Lightness) reference.
I have tried writing:
objShape.Cells("FillForegnd").Formula = "HSL(144, 116, 225)"
.... but that returns an error message:
" Run-Time error '-2032466667 (86db0515)':
Syntax error: bad fraction."
I get the same error if I add an "equal sign" before "HSL":
objShape.Cells("FillForegnd").Formula = "=HSL(144, 116, 225)"
The numbers (144, 116, 225) should be correct (I'm copying them from the
FillForegnd cell of the "Fill Format" section from the ShapeSheet of another
shape).
Could anyone tell me what I'm doing wrong, please?
Thanks in advance!
Best wishes,
Ricardo Dias Marques
newsgroup DOT poster AT hotmail DOT com