ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Form (https://www.excelbanter.com/excel-programming/293981-user-form.html)

brad

User Form
 
Thanks for reading my question

I have a for that I made in the VB environment. It has a
combo box that I want to retrieve the value from.

The rowsource is set to a named range on the workbook
sheet. It is a list of names.

How do I get the value of the combo box. Right now all I
get is 0 or False.


Thanks again,

Brad

Private Sub FilterPlease_Click()
Dim FilterValue As String
FilterValue = Me.FilterPlease
MsgBox FilterValue
Range("A7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
'Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=FilterValue
Range("E7").Select
End Sub

Bob Phillips[_6_]

User Form
 
Brad,

I get the value that I select from the Combo. I assume that the Combo is
called FilterPlease and you are clicking a value in it?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Brad" wrote in message
...
Thanks for reading my question

I have a for that I made in the VB environment. It has a
combo box that I want to retrieve the value from.

The rowsource is set to a named range on the workbook
sheet. It is a list of names.

How do I get the value of the combo box. Right now all I
get is 0 or False.


Thanks again,

Brad

Private Sub FilterPlease_Click()
Dim FilterValue As String
FilterValue = Me.FilterPlease
MsgBox FilterValue
Range("A7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
'Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=FilterValue
Range("E7").Select
End Sub




brad

User Form
 
I deleted the combo box, and put a new one on the form.
I did not change the name and it worked. I am not sure
what was wrong.

Thanks,

Brad
-----Original Message-----
Brad,

I get the value that I select from the Combo. I assume

that the Combo is
called FilterPlease and you are clicking a value in it?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Brad" wrote in

message
...
Thanks for reading my question

I have a for that I made in the VB environment. It

has a
combo box that I want to retrieve the value from.

The rowsource is set to a named range on the workbook
sheet. It is a list of names.

How do I get the value of the combo box. Right now

all I
get is 0 or False.


Thanks again,

Brad

Private Sub FilterPlease_Click()
Dim FilterValue As String
FilterValue = Me.FilterPlease
MsgBox FilterValue
Range("A7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
'Selection.AutoFilter
Selection.AutoFilter Field:=1,

Criteria1:=FilterValue
Range("E7").Select
End Sub



.



All times are GMT +1. The time now is 04:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com