Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter results Ben Wunderin Excel Discussion (Misc queries) 3 December 2nd 08 12:31 AM
Selection.AutoFilter Field / Criteria = criteria sometimes non-existing on worksheet markx Excel Programming 1 November 24th 06 02:52 PM
Get Average on results of Autofilter [email protected] Excel Programming 3 May 8th 06 11:42 PM
criteria 1(a,b,c), criteria 2 (T,F) - Results (3 answers) achievab Kikkoman Excel Discussion (Misc queries) 5 July 1st 05 11:05 PM
Strange Results with Autofilter Joyce Excel Discussion (Misc queries) 1 January 17th 05 02:42 AM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"