I want to copy data from one worksheet to another (depending upon the number of Worksheets available), with the number of columns being dynamic.
If I use the code below it shows an Application object error:
Worksheets(1).Range(Cells(m, 2), Cells(m, 7)).Value = ThisWorkbook.Worksheets(i).Range(Cells(3, 2), Cells(3, 7)).Value
While if I use this:
Worksheets(1).Range(Cells(m, 2), Cells(m, 7)).Value = ThisWorkbook.Worksheets(i).Range("B2:G2").Value
it works fine, but I cannot make my columns dynamic.