Hello,
I am struggling with trying to get my macro to go to each individual sheet and call (run) another macro
Dim ary As Variant
Dim sht As Variant
With Sheets("SheetsToRun")
ary = .Range("B1", .Range("B" & Rows.Count).End(xlUp)).Value
End With
For Each sht In ary
With Sheets(CStr(sht))
Call ABC123
End With
Next sht
On the tab "SheetsToRun" cells B1:B5 I have tab names in my workbook
When I run the macro, it successfully runs my ABC123 on the first tab (value in SheetsToRun cell B1), but it does not go to the next tab (values in SheetsToRun cells B2:B5)
Instead it repeats on the first tab over and over.
I am struggling with trying to get my macro to go to each individual sheet and call (run) another macro
Dim ary As Variant
Dim sht As Variant
With Sheets("SheetsToRun")
ary = .Range("B1", .Range("B" & Rows.Count).End(xlUp)).Value
End With
For Each sht In ary
With Sheets(CStr(sht))
Call ABC123
End With
Next sht
On the tab "SheetsToRun" cells B1:B5 I have tab names in my workbook
When I run the macro, it successfully runs my ABC123 on the first tab (value in SheetsToRun cell B1), but it does not go to the next tab (values in SheetsToRun cells B2:B5)
Instead it repeats on the first tab over and over.