I absolutely detest the range object. How does it read cell references? In the code below, I am trying to search the last occupied column on a sheet. So, I start off from column 1000 and down to column 1:
EndCol = 1001: Do
EndCol = EndCol - 1
Set rScanArea = .range(.Cells(1, EndCol), .Cells(1048576, EndCol))
Loop While WorksheetFunction.CountA(rScanArea) = 0 and EndCol > 0
This did not work, but it did after I appended ".address()" after my cell references. So I guess in my original code, vba was reading the values of the cells. However, in the past, there were instances where the address attribute is not needed. For example, the following worked:
.Cells(i, 4).Hyperlinks.Add Range(.Cells(i, 4), .Cells(i, 4)), strLink