for...next and criteria1

  • Thread starter Thread starter jafeol
  • Start date Start date
J

jafeol

Hello,

Could someone tell me why the following code doesn't work:

Dim Code
For Code := 1 To 13
Selection . Autofilter Field := 3 , Criteria1 := Code, Operator :
xlAnd
......
Next

It always stops at the line with Criteria1

Thank you

F
 
Could someone tell me why the following code doesn't work:

Dim Code
For Code := 1 To 13

For Code=1 To 13
Selection . Autofilter Field := 3 , Criteria1 := Code, Operator :=
xlAnd

Selection.AutoFilter Field:=3, Criteria1:=Code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top