read and update Custom Properties

C

Caroline

I'm trying to set, and read Custom properties:

For Each Shap In ActivePage.Shapes
Shap.Cells("Prop.cp").Formula = "=" & Chr(34) & "some value" &
Chr(34)

leads to the following error:
Run-time error '-2032466967 (86db03e9)':
Unexpected end of file.
It seems that the Custom Properties I added, namely cp, cannot be
updated. (I checked, they CAN be changed by right clicking on the
shape and using the GUI)

if however, I try to set a preexisting Custom Property (ie. Cost
or Duration in this case), it works fine

MsgBox Shap!cp
leads to the following error:
Run-time error '451':
Property let procedure not defined and property get procedure
did not return an object
How can I read this value?

Thanks
 
R

Russ McKenna

Try this

Dim AShape as Visio.Shape

for each ashape in activepage.shapes
ashape.cells("Prop.cp").formula = Chr(34) & "Hello There" & Chr(34)
'some string
' or
ashape.cells("Prop.cp").formula = 34.8 'some value
msgbox ashape.cells("Prop.Cp").formula
next
 

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