ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   for...next and criteria1 (https://www.excelbanter.com/excel-programming/300561-next-criteria1.html)

jafeol

for...next and criteria1
 
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

--
Message posted from http://www.ExcelForum.com


cucchiaino

for...next and criteria1
 
"jafeol " ha scritto nel messaggio
...

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


.....
Next







All times are GMT +1. The time now is 10:49 AM.

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