I have the following code to run a sub:
which I want to replace with![]()
Call repeatColumns(wsCalc.Range(Cells(7, 8), Cells(7, 45)), 4, RowLen, wsNew)
to make it dynamic.![]()
Call repeatColumns(wsCalc.Range(Cells(7, 7), Cells(lCol, 45)), 4, RowLen, wsNew)
When I try to run it, I get the following error
Run-Time Error '1004': Method 'Range' of object '_Worksheet' failed.
Not sure what I am doing wrong as it works with:
Thank you.![]()
Call repeatRows(wsCalc.Range("C8:C" & (lCol + 7)), 3, RowLen, wsNew)
Bookmarks