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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms in Visio

Status
Not open for further replies.

andypeacock

Programmer
Joined
Jan 28, 2003
Messages
1
Location
GB
Hi,

I am trying to add a combobox into a visio diagram. I am building a network diagram and would like to have a combobox on each server shape so that when I add servers to the diagram I can use the dropdown list to select the correct value. I can add a combobox, but cannot populate the list. Any Ideas?

Thanks.

Andy
 
The example below will populate a combo box named server1
Copy the text below an paste it into the DropButtonClick procedure. Obviously altering the text in " " to whatever you like. Hope this helps.

Private Sub Server1_DropButtonClick()
Dim Thing As Variant
On Error GoTo FillList
For Each Thing In Me.Server1.List
Me.server1.RemoveItem 0
Next Thing
FillList:
Me.Server1.AddItem ""
Me.Server1.AddItem "a"
Me.Server1.AddItem "ab"
Me.Server1.AddItem "abc"
Me.Server1.AddItem "abcd"
Me.Server1.AddItem "abcde"
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top