Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
2,175 questions
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))