Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In a sheet I have two text boxes and a search button
when the user inputs some value into the text boxes and clicks the search I want the data to be filtered.... I have started to write a macro and got stuck any help ? Private Sub Image1_Click() Dim s As String Dim p As String s = TextBox1.Value p = TextBox2.Value Selection.AutoFilter Field:=5, Criteria1:="=5", Operator:=xlAnd, Criteria2:="<=400" end sub Also in case of error.. like if the user doesnt type value in the boxes? what codes goes ?I |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Keep autofilter after macro is run | Excel Worksheet Functions | |||
Loop Macro autofilter | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |