News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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


Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 199 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1062KB.
Tokens: post-login.
Cache hits: 13: 0.00232s for 26,738 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]