Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box in Visio 2

Status
Not open for further replies.

Alcedes

Technical User
Mar 25, 2008
46
US
Is there any way to have a fully functioning List Box in visio other than inserting an Excel spread sheet and creating it there?
 
Hi,

I'm not sure exactly what you're doing, but yes, you can insert a list box into a Visio drawing. Just go to View->Toolbars->Developer and click the icon that looks like a radio button with a command button in front of it (the circle and square). Then scroll down and select Microsoft Forms 2.0 Listbox. Since Visio has VBA capabilities, you can use an ADO recordset to populate it.

Hope that helps.
 
Ok. That worked great! Thanks!

One more question for ya tho.

Now I have my list, and when the document loads it is populated. My visio document looks for you to click a selection on the list and then takes you to a specific page bsed on what you click.

How do i make the default selection index 0? or in other words, how do I make the default selection whatever entry is at the very top of my list?
 
Glad that worked for you. To answer your second question, the syntax would be:
Code:
If lstOptions.ListCount > 0 Then
    lstOptions.ListIndex = 0
End If
where lstOptions would be replaced with the name of your list box. You would then want to place this right after the code you use to populate the list box or in another appropriate event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top