Hi.
I have prepared a form which I use to autofilter certain data.there are nearly 30000 lines and I use following code
Private Sub CommandButton2_Click()
Sheets("Report").Select
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
<o> </o>
Selection.AutoFilter Field:=2, Criteria1:="=*" & TextBox3.Text & "*", Operator:=xlAnd
<o> </o>
Selection.AutoFilter Field:=3, Criteria1:="=*" & TextBox2.Text & "*", Operator:=xlAnd
<o> </o>
Selection.AutoFilter Field:=4, Criteria1:="=*" & TextBox1.Text & "*", Operator:=xlAnd
<o> </o>
Selection.AutoFilter Field:=7, Criteria1:="=*" & TextBox4.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=8, Criteria1:="=*" & TextBox5.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=9, Criteria1:="=*" & TextBox6.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=18, Criteria1:="=*" & TextBox7.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=19, Criteria1:="=*" & TextBox8.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=20, Criteria1:="=*" & TextBox9.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=34, Criteria1:="=*" & TextBox10.Text & "*", Operator:=xlAnd
End sub
This code only selects 21000 lines out of 30000 lines where as It need to select all 30000 lines or any number of lines the sheet contains.I am unable to figure out the problem can anyone help me with this.
<o> </o>
<o> </o>
<o> </o>
I have prepared a form which I use to autofilter certain data.there are nearly 30000 lines and I use following code
Private Sub CommandButton2_Click()
Sheets("Report").Select
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
<o> </o>
Selection.AutoFilter Field:=2, Criteria1:="=*" & TextBox3.Text & "*", Operator:=xlAnd
<o> </o>
Selection.AutoFilter Field:=3, Criteria1:="=*" & TextBox2.Text & "*", Operator:=xlAnd
<o> </o>
Selection.AutoFilter Field:=4, Criteria1:="=*" & TextBox1.Text & "*", Operator:=xlAnd
<o> </o>
Selection.AutoFilter Field:=7, Criteria1:="=*" & TextBox4.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=8, Criteria1:="=*" & TextBox5.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=9, Criteria1:="=*" & TextBox6.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=18, Criteria1:="=*" & TextBox7.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=19, Criteria1:="=*" & TextBox8.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=20, Criteria1:="=*" & TextBox9.Text & "*", Operator:=xlAnd
Selection.AutoFilter Field:=34, Criteria1:="=*" & TextBox10.Text & "*", Operator:=xlAnd
End sub
This code only selects 21000 lines out of 30000 lines where as It need to select all 30000 lines or any number of lines the sheet contains.I am unable to figure out the problem can anyone help me with this.
<o> </o>
<o> </o>
<o> </o>