Can Custom Properties of type 'String' be set from variables?

L

Lant

If so, how?

I read the custom properties from a Recordset using rsRecordset!Fieldname
and try to set the custom properties on a shape I have created
programmatically.

Set tempCell = tempShape.CellsSRC(visSectionProp, visRowProp + 1,
visCustPropsValue)

tempCell.Formula = recordsetElements!ElementName

This works fine when I try to set numeric properties. It also works when I
assign properties from other cell or shape.
I tried several variations in the value being assigned including the
following:

" & recordsetElements!ElementName & "
"="" & recordsetElements!ElementName & """

Am I setting the right cell property (tempCell.Formula) or should I be
trying some other property (Result, ResultStr, etc).

Any help greatly appreciated.
 
J

junethesecond

String must be double quated
to put in a cell.
StringToFormulaForString function
is available in the code library
in the Visio SDK.
But, more shortly,
Public Function QW(s As String) As String
QW = Chr(34) & s & Chr(34)
End Function
 

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