Multi-Select in a Shape Attribute Variable List

Started by bakervisgal, November 13, 2012, 09:17:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bakervisgal

Greetings! I have a lot of shape attributes and for one particular attribute I have set the type to a variable list with a list of names. Is there a way in Visio to have the ability to select multiple names in this attribute and Visio would create a list based on that selection. For example, if my variable list is:

John
Stephen
Joseph
Kimmy


and I want the value to be Stephen;Joseph, how would I go about doing that without just typing it into a String?

Help is greatly appreciated!

Jumpy

I fear there's no way to do that with the ShapeData dialog. There's no multiselect. You would have to create your own dialog using VBA and a form.

bakervisgal

Ok thanks so much! Quick question...

So I created a VBA form that is a multi-select listbox. All of my code works except I can't seem to set the value of the Shape Data Cell to the String that I grab from the listbox. I'm using the follow line below but I keep getting an error. Any idea?

vsoShape.CellsU("Prop.Actor_Responsible").FormulaU = "actor"


where actor is a String variable that I have populated with a String from the listbox.

Thanks again!
   

Jumpy

If actor is a String-Variable:

vsoShape.CellsU("Prop.Actor_Responsible").FormulaU = CHR(34) & actor & CHR(34)

(CHR(34) Adds the "" to the String without confusing VBA.)

If "actor" were not a variable, but String itself you'ld use:

vsoShape.CellsU("Prop.Actor_Responsible").FormulaU = CHR(34) & "actor" & CHR(34)

bakervisgal