Hey everyone
I am having to make changes to my userform and I thought i had got the code working. I have created Option buttons for the reports and have the code set. I need to link ComboBox2 to the Option Buttons. If a end user selects VDPS, only the options on the tab "VDPS" will appear in the Combo Box. i wrote the module but I'm getting hung up somewhere. I also would like the items highlighted in yellow on the userform to only be visible if the end users select the "VDPS" option button. Anyone have any thoughts were I'm going wrong?
I have altered all the Option Buttons like so: I have 4 option buttons
Private Sub OptionButtonEtran_Click()
OptionChange (1)
End Sub
I wrote the Module like this
Sub OptionChange(myOption As Long)
Dim Limit As Long
Select Case myOption
Case 1
Limit = Sheets("Hogan").Cells(Rows.Count, 3).End(x1Up).Row
DinnerPlannerUserForm.ComboBox2.ListFillRange = "WR!A1:A" & Limit
Case 2
Limit = Sheets("Etran").Cells(Rows.Count, 3).End(x1Up).Row
DinnerPlannerUserForm.ComboBox2.ListFillRange = "WR!A1:A" & Limit
Case 3
Limit = Sheets("Fraud").Cells(Rows.Count, 3).End(x1Up).Row
DinnerPlannerUserForm.ComboBox2.ListFillRange = "WR!A1:A" & Limit
Case 4
Limit = Sheets("VDPS").Cells(Rows.Count, 3).End(x1Up).Row
DinnerPlannerUserForm.ComboBox2.ListFillRange = "WR!A1:A" & Limit
End Select
End Sub
Bookmarks