Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform results as Autofilter Criteria
Male, Female, Unknown/Unspecified????????
Jim Thomlinson wrote: I'm curious Bob... For options you assigned M, F and U to be your filter criteria... Somehow that just does not seem random. What do M, F and U stand for??? -- HTH... Jim Thomlinson "Bob Phillips" wrote: 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 -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform results as Autofilter Criteria
That man obviously thinks like I do ... or do I think like him?
-- --- HTH Bob (change the xxxx to gmail if mailing direct) "Dave Peterson" wrote in message ... Male, Female, Unknown/Unspecified???????? Jim Thomlinson wrote: I'm curious Bob... For options you assigned M, F and U to be your filter criteria... Somehow that just does not seem random. What do M, F and U stand for??? -- HTH... Jim Thomlinson "Bob Phillips" wrote: 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 -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform results as Autofilter Criteria
Either way, you're in trouble <bg.
Bob Phillips wrote: That man obviously thinks like I do ... or do I think like him? -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Dave Peterson" wrote in message ... Male, Female, Unknown/Unspecified???????? Jim Thomlinson wrote: I'm curious Bob... For options you assigned M, F and U to be your filter criteria... Somehow that just does not seem random. What do M, F and U stand for??? -- HTH... Jim Thomlinson "Bob Phillips" wrote: 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 -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofilter results | Excel Discussion (Misc queries) | |||
Selection.AutoFilter Field / Criteria = criteria sometimes non-existing on worksheet | Excel Programming | |||
Get Average on results of Autofilter | Excel Programming | |||
criteria 1(a,b,c), criteria 2 (T,F) - Results (3 answers) achievab | Excel Discussion (Misc queries) | |||
Strange Results with Autofilter | Excel Discussion (Misc queries) |