Displaying a Custom Property in a text box.

B

Bing

I am very new at Visual Basic, and I am trying to find a way to display a
custom property in a message or input box after double clicking on a group.
Double clicking on the group runs the macro which changes the layer
properties to highlight the grouped objects. I need to have a box appear to
display various info about the group objects.

Thanks, In Advance
Bing
 
C

Chris Roth [MVP]

You can get a custom property with the VBA code below. First, you need the
ShapeSheet cell name of the property. If you have a custom property named
cost, then the cell name is likely Prop.Cost, but check in Window > Show
ShapeSheet first to make sure that's the row name!

Then:

Dim shp as Visiio.Shape
Set shp = Visio.ActiveWindow.Selection(1)
MsgBox shp.Cells("Prop.Cost").ResultStr( Visio.VisUnitCodes.visNoCast )


--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/
 

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