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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.