Viso Text(number) automation

D

dk

Hi. Can I somehow type in two different number in Visio, and have another
number that does a formula to add those numbers. So I would like to do
similar things excel does; however I do not want to add an excel spreadsheet
object because it is a waste of space and memory. Thanks
 
D

David Parker [Visio MVP]

Yes.
You can create custom properties to hold the numbers, and another to do the
calculation (you will need to use the ShapeHeet to enter the formula eg
=Prop.Number1 + Prop.Number2, because the custom properties dialog and
window do not allow formulas to be entered.

(In fact, you could use just text blocks)
If you look at the ShapeSheet functions in the Developer Reference, you will
see that there are a lot of math functions ... much like Excel - since it
was originally modelled on it.
 
D

dk

how do i exactly go about doing this.
I want to display the number. Where would I enter the formula or number to
show the number in the chart.

Thanks
 
M

Mark Nelson [MS]

Everything in Visio starts with shapes. Presumably you have a shape in your
diagram that will display the calculated result.

First, add two custom properties to the shape to hold your numbers. Go to
Shape > Custom Properties and then say Yes to create custom properties (or
click Define if you are not prompted to create them). Give your first
property a Label, click New and give your second property a Label. Then
click OK and fill in the values you want to add. Click OK again.

Now choose Insert > Field to display the calculated result. Select the
Custom Formula category and then enter this formula:
=Prop.Row_1+Prop.Row_2

You easily change the values for your properties using View > Custom
Properties Window. You can duplicate the shape to show more than one
result.

--
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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