Greetings,
I need to run through a series of worksheets by the same name in different workbooks. I am receiving the "for loop not initialized" error on the last line. Not sure how to troubleshoot this and not really understanding the error in this portion of the code.
Thanks!
I need to run through a series of worksheets by the same name in different workbooks. I am receiving the "for loop not initialized" error on the last line. Not sure how to troubleshoot this and not really understanding the error in this portion of the code.
Thanks!
Code:
For Each Worksheet In PA
G = ActiveSheet.Name
PA.Worksheets(G).Activate
Range("A:A").Select
Selection.NumberFormat = "mm/dd/yyyy;@"
MAIN.Worksheets(G).Activate
Range("A:A").Select
Selection.NumberFormat = "mm/dd/yyyy;@"
FO.Worksheets(G).Activate
Range("A:A").Select
Selection.NumberFormat = "mm/dd/yyyy;@"
O.Worksheets(G).Activate
Range("A:A").Select
Selection.NumberFormat = "mm/dd/yyyy;@"
Next Worksheet