I keep getting an error message saying subscript out of range with this code.
Sub Check_First()
Dim Z As Integer
Z = 1
Do While Z <= Range("o1").Value
Range("r1").Value = Z
Range("AH2").Select
Range("A2:AJ2").Select
Selection.AutoFilter
Selection.AutoFilter Field:=34, Criteria1:=Range("r1").Value
Sheets("EQ1 No Tickets1").PrintOut
Z = Z + 1
Loop
MsgBox "The Do While loop made " & Z & " loop(s)."
End Sub
All help is very much appreciated by this novice.
Sub Check_First()
Dim Z As Integer
Z = 1
Do While Z <= Range("o1").Value
Range("r1").Value = Z
Range("AH2").Select
Range("A2:AJ2").Select
Selection.AutoFilter
Selection.AutoFilter Field:=34, Criteria1:=Range("r1").Value
Sheets("EQ1 No Tickets1").PrintOut
Z = Z + 1
Loop
MsgBox "The Do While loop made " & Z & " loop(s)."
End Sub
All help is very much appreciated by this novice.