Hello i have the following code:
this code sit's in a for "i = 1 to 10"
The first time whenever he doesn't find the sheets("Bev - MTD") he goes to Fout4:
But the next file he opens and there isn't sheets("Bev - MTD") he gots stuck.
Don't really see the problem?
Is it because it can only have once that error and can't go to Fout4 because it is in a "i = 1 to 10"?
Why does it work for one file but not for the others?
Kind regards,
Les
Code:
On Error GoTo Fout4
Sheets("Bev - MTD").Select
Range("A1").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("Month2").CurrentPage = CurrentMonth
Fout4:
this code sit's in a for "i = 1 to 10"
The first time whenever he doesn't find the sheets("Bev - MTD") he goes to Fout4:
But the next file he opens and there isn't sheets("Bev - MTD") he gots stuck.
Don't really see the problem?
Is it because it can only have once that error and can't go to Fout4 because it is in a "i = 1 to 10"?
Why does it work for one file but not for the others?
Kind regards,
Les