Microsoft 365 and Office | Development | Other
Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to cycle thru sheets to perform code. It works on the first sheet, but not the others. The code fails (stops) at the Set rngTarget expression.
For Each sheet In ActiveWorkbook.Worksheets
If sheet.Index > 1 Then
Set rngTarget = sheet.Range(Cells(1, 8), Cells(1, arrSize))
Try this:
Set rngTarget = sheet.Range(sheet.Cells(1, 8), sheet.Cells(1, arrSize))