I have sheet 1 active, and I'm trying to perform a merge operation on some cells in Sheet 2, but I'm getting a 'Method 'Range of object '_Worksheet' failed'' error.
Dim rawData As Worksheet
For i = 2 To 12 Step 2
rawData.Range(Cells(2, i), Cells(2, (i + 1))).Merge
Next i
However it does work if I insert a rawData.Activate
line beforehand. Is there any way to accomplish this without activating the sheet first?