Re: FillForegnd syntax error - bad fraction - with HSL reference



Ola Ricardo,

Works fine for me. And since you're using 2003, there shouldn't be any
"non-US" problems like list separators or localized cell/formula names.

Are you sure you have the right shape object, for example a sub-shape
instead of a group. Does the shape have any locked attributes? Like locked
layers or cells in the protection section? Of course = 16 does work for you,
so this wouldn't make a lot of sense.

Might try this as well:

objShape.CellsU("FillForegnd").FormulaForceU = "HSL("144, 116, 225)"

Sorry I can't give you anything definite!

--
Hope this helps,

Chris Roth
Visio MVP

More Visio shapes, articles, development info and pure diagramming fun at:
www.wanderkind.com/visio


"Ricardo Dias Marques" <Ricardo Dias Marques@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:9A702DE6-B244-4510-9BD3-BB2039E2E557@xxxxxxxxxxxxxxxx
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


.



Relevant Pages

  • Problem with internal CD writing wizard
    ... It shows my DVD/CD writing hardware and some files ... it starts to write what looks like an ISO file and takes 7 ... The disc you have attempted to write may no longer be ... this error message is obviously erroneous and on occasion ...
    (microsoft.public.windowsxp.embedded)
  • Re: CD Writing wizard
    ... I am now getting an error message stating that the CD writing ... >>wizard cannot be completed and 'there was an error in the writing process'. ... Also, in Device Manager (Win+Break, select ... > Stan Brown, Oak Road Systems, Tompkins County, New York, USA ...
    (microsoft.public.windowsxp.general)
  • Re: Cannot Complete the CD Writing Wizard
    ... "This error message may occur if the IMAPI CD Burner service is turned ... Start the IMAPI CD Burner service, and then test it by writing ... >checked the drive's properties for enabling CD recording, etc., but to no ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Cannot Complete the CD Writing Wizard
    ... "This error message may occur if the IMAPI CD Burner service is turned ... Start the IMAPI CD Burner service, and then test it by writing ... >checked the drive's properties for enabling CD recording, etc., but to no ...
    (microsoft.public.windowsxp.general)