cellsSRC question

M

mike

I'm trying to set a cellsSRC using a variable, with no luck. It look like this:
AShape.CellsSRC(visSectionProp, visRowLast, visCustPropsLabel).FormulaU =
rowKey

rowKey is a string.
If I set rowKey = "1111" , it seems to work fine.
If I set rowKey to what I want... "1111_Test", it fails.
Of course, if I use a literal "1111_Test", it works fine.

I am very confused...
 
A

Andy

When your setting a formula to a string value, Visio needs an extra
set of quotes around the string,

cellObj.Formula = chr(34) & myString & chr(34)

cellObj.formula = ""Test""
 
J

JuneTheSecond

"1111_Test" should be replaced by """1111_Test""" .
The text that cannot be estimated as numerical formula must be double qoted.
Visio SDK has another good example.
 
M

mike

Thanks!!! That works fabulously.

Andy said:
When your setting a formula to a string value, Visio needs an extra
set of quotes around the string,

cellObj.Formula = chr(34) & myString & chr(34)

cellObj.formula = ""Test""
 

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