C
Carrie_Loos via OfficeKB.com
Hi - I have created a userform(multi) with a ListBox (Multiple Lists) on a
tab and I am now stuck. What I need to do is when the user selects a choice
in one of the listboxes I want it to go to a sheet named "Classes" and select
the appropriate column and value, from the listbox, and apply it to the
filters I have so that only that item appears on the sheet. I have gotten as
far as below with the 'MsgBox "True" and MsgBox "False' as place holders but
I cannot figure out how to write the filter portion....[In this case the
Unique_Class_ID is in column E] Can anyone help?
Thanks
Carrie
Dim ctrl As Control
ListBox1.RowSource = "CLasses!Unique_Class_ID"
Select Case ListBox1.ListIndex
Case -1
MsgBox "True"
Case Else
MsgBox "False"
End Select
For Each ctrl In UserForm1.Controls
If TypeOf ctrl Is MSForms.TextBox Then
ctrl.Value = ""
ElseIf TypeOf ctrl Is MSForms.OptionButton Then
ctrl.Value = False
End If
Next ctrl
tab and I am now stuck. What I need to do is when the user selects a choice
in one of the listboxes I want it to go to a sheet named "Classes" and select
the appropriate column and value, from the listbox, and apply it to the
filters I have so that only that item appears on the sheet. I have gotten as
far as below with the 'MsgBox "True" and MsgBox "False' as place holders but
I cannot figure out how to write the filter portion....[In this case the
Unique_Class_ID is in column E] Can anyone help?
Thanks
Carrie
Dim ctrl As Control
ListBox1.RowSource = "CLasses!Unique_Class_ID"
Select Case ListBox1.ListIndex
Case -1
MsgBox "True"
Case Else
MsgBox "False"
End Select
For Each ctrl In UserForm1.Controls
If TypeOf ctrl Is MSForms.TextBox Then
ctrl.Value = ""
ElseIf TypeOf ctrl Is MSForms.OptionButton Then
ctrl.Value = False
End If
Next ctrl