Listbox to ComboBox

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
786
Office Version
  1. 365
Hi,

how can i chang the code below to work in ComboBox1 instead listbox.

Code:

Code:
Private Sub ComboBox1_Change()Dim i As Integer
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then
Select Case ListBox1.List(i)
Case "Allstream"
    Call Allstream
        Case "ANI NETWORKS"
    Call ANINET
        Case "AT&T"
    Call At
        Case "ATT"
    Call ATT
        Case "COGECO"
    Call MyPeer
        Case "Cogent"
    Call Cogent
     Case "CityWest"
    Call CityWest
        Case "EQUNIX"
    Call EQUINIX
        Case "BELLMTS"
    Call mts
        Case "Rogers Business Solutions"
    Call Rogers_Login
        Case "SHAW BUSINESS"
    Call SHAW
        Case "SOMOS"
    Call SomosLogin
        Case "VOXBONE"
    Call VOXBONE
        Case "TECHDATA CENTRE"
    Call TECHDATA
        Case "CANAD POST"
    Call CanadaPost
        Case "PUROLATOR COURIER"
    Call PUROLATOR
        Case "THINKTEL 913"
    Call THINKTEL20000913
        Case "THINKTEL 448"
    Call THINKTEL20000448
        Case "XO COMMUNICATIONS"
    Call XOMCOMMUNICATIONS
        Case "ZAYO ALLSTREAM"
    Call ZAYO
End Select
End If
Next i
End Sub

thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top