I\'m confused by the Range.Cells property. According to MSN documentation:
Range.Cells Property (Excel)
The syntax is supposed to be expression .Cells
When no dot .
precedes a Cells
or Range
method, this is called an unqualified range reference; Excel's VBA wraps it automatically to the sheet that is currently active.
Cells(1, 1) <==> Activesheet.Cells(1, 1)
Range("A1") <==> Activesheet.Range("A1")
However, this is considered bad practice and it should be avoided because it leads to random issues and bugs; the code's behavior depends on what sheet the user currently has on top in Excel's GUI. Experienced developers always avoid it as much as possible and use qualified ranges; ie
Worksheets("someSheetName").Cells(1, 1)
.