Greetings,
I am running a chunk of code that uses a loop.
I am receiving the error in the title on the For Each loop line.
Is the For Each loop structured correctly, or might I just have an error in the names as they appear in the array as compared to the workbooks. The worksheet names are different than they appear in the code above.
I am running a chunk of code that uses a loop.
Code:
Dim A As WorksheetDim B As String
For Each A In Sheets(Array("sheet1", "sheet2"))
B = A.Name
I am receiving the error in the title on the For Each loop line.
Is the For Each loop structured correctly, or might I just have an error in the names as they appear in the array as compared to the workbooks. The worksheet names are different than they appear in the code above.