please help me with creating a drop down list that will activate a subroutine

Hello,

My level is the level before pre-novice. I'm having a great deal of difficulty trying to create a drop down list that will activate a subroutine once you select one of the numbers 1-15, and you can keep selecting various numbers 1-15.

This is what I have so far:
I've got the drop down list completed (numbered 1-15)
And the code below (I'll finish the rest of the cases when I can get these two working)

Private Sub ShowSaleComps()

ActiveWindow.DisplayZeros = False
Application.ScreenUpdating = False

Select Case NumSelect
Case 3
Call Show3Comps
Case 15
Call Show15Comps
Case Else
MsgBox ("Please enter a number 3 to 15")
End Select
End If

Application.ScreenUpdating = True

End Sub

Vishesh's picture

Drop down list

Change the sheet and combo name reference as per your requirement

Private Sub ShowSaleComps()
Dim NumSelect As Integer

ActiveWindow.DisplayZeros = False
Application.ScreenUpdating = False

With Sheet1.ComboBox1
NumSelect = .List(.ListIndex)
End With

Select Case NumSelect
Case 3
Call Show3Comps
Case 15
Call Show15Comps
Case Else
MsgBox ("Please enter a number 3 to 15")
End Select

Application.ScreenUpdating = True

End Sub