![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 26
|
can you change the filter criteria of a worksheet based on the value of a combobox on a userform?
Example: I have a worksheet that has two columns of data. In column A, I have three different entries, completed, pending, & paused. In column B, I have just misc tasks. I have filtered the worksheet based on column A. Is there a way that when select one of the three column A criteria in combobox1 on my userform only the data that matches that criteria in column B displays in listbox1?? [ This Message was edited by: VTTW on 2002-03-25 19:33 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Wellington
Posts: 104
|
Hi,
You can try the following line of code: Selection.AutoFilter Field:=14, Criteria1:=Sheets("Sheet1").combobox1.value HTH |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Wellington
Posts: 104
|
Just a note,
"Field" is the column number of your selection. "Criteria" is the custom filter criteria. HTH |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|