Option Explicit
Private Sub cmdAdd_Click()
Dim city As String
Dim n As Integer
Dim i As Integer
n = InputBox("Enter No of Cities:")
For i = 1 To n
city = InputBox("Enter Name of City:")
Combo1.AddItem city
Next
End Sub
Private Sub cmdDelete_Click()
If Combo1.ListCount = 0 Then
MsgBox ("List is Empty")
Else
Combo1.RemoveItem Combo1.ListIndex
End If
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub