setting connector formula from vb

D

dblyth2007

Hi,

I've spent the last through days trying to get through all the problems that
crop up when I try to run the application with my regional number settings
set to German, where the ',' and '.' are reversed for example.

I have a line of code that makes up a function to draw a connector between
two points.

vsoBeginCellX.formula = "PAR(PNT(" & TempName & _
"!Connections.IN" & InputNumber & ".X," & TempName & _
"!Connections.IN" & InputNumber & ".Y))"

The variables TempName and InputNumber are ofcourse substituted by strings.
The formula is infact being set to:

"PAR(PNT(SHAPE A!Connections.IN1.X,SHAPE A!Connections.IN1.Y))"

This works ok for UK settings, but falls over with German. I've done a bit
of searching and tried putting in extra " (or chr(34), I've also tried using
'formulaU' but I get the ?NAME error even with UK settings.

The X and Y settings are normally stored in CM with standard UK/US
delimeters, I guess either the PNT, PAR or general formula property is not
dealing with this when the delimeter is a comma for the decimal point (when
doc is created with German locale).

Elsewhere in my program I've used the vb 'replace' function to convert the
delimeter to a '.' for any number calculations, but I don't know how to try
this within a formula, or if indeed that is the direction to look.

Any help in this area is appreciated.

regards

dblyth2007
UK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top