Userform results as Autofilter Criteria
Dim sOption As String
Dim sCombo As String
With Me
Select Case True
Case .OptionButton1.Value: sOption = "M"
Case .OptionButton2.Value: sOption = "F"
Case .OptionButton3.Value: sOption = "U"
End Select
sCombo = .ComboBox1.Value
End With
With Worksheets("Sheet1")
.Range("A:C").AutoFilter
.Range("A:C").AutoFilter field:=2, Criteria1:=sOption
.Range("A:C").AutoFilter field:=3, Criteria1:=sCombo
End With
--
---
HTH
Bob
(change the xxxx to gmail if mailing direct)
"CLR" wrote in message
...
Hi All..........
First attempt at Userform use. I need help with code to enter the active
button of a 3-button RadioButton array as Criteria1 of an Autofilter, and
the
contents of a ComboBox as the second criteria if someone please.
TIA
Vaya con Dios,
Chuck, CABGx3
|