Custom properties

J

Jason V

I have a variable named SLabel that changes content (string content). I am
placing a shape through code and am changing the custom property named label
to what is in SLabel. Here is the code:

VisDoc.Application.ActiveDocument.Pages("Page-1").Drop mstStencil, SpinX,
SpinY
Set selObj = VisDoc.Application.ActiveWindow.Selection
Set vsoShape = selObj(1)
idx = vsoShape.ID
Dim vsoCell As Visio.Cell
Set vsoShape = VisDoc.Application.ActiveWindow.Page.Shapes.ItemFromID(idx)
Set vsoCell = vsoShape.Cells("Prop.Label.value")
vsoCell.FormualU = SLabel

I have tried vsoCell.text, .resultstr, .resultU and everything gives me an
error. If I just replace Slabel with """SLabel""" it puts in SLabel not it's
value. If I replace SLabel with a 3 then it puts in a 3. How do I get this to
work for a variable name?
Thanks
 
J

Jason V

That worked, thank you. Do you know where I can go to learn more about that
and
the .resultU, .ResultStr, .FormulaU etc.?
 

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