You are trying to set a range object to be equal to a string.
LastCell is a Range
But ....Address is a string.
If you want to set LastCell = to the range object represented by the last cell
in your worksheet, then you should:
Set LastCell = ActiveSheet.Cells(LastRow, LastCol)
If you really want to set LastCell = to the Address, which is a string, then
Dim LastCell as String
I'm not sure exactly what you are trying to do, but be aware that your code
will give you the last column used in Row 1, and the last row used in Column A.
So if you have a worksheet where your only entry is in F10, your code will