Yes you will get an error as a row is not an object(Range). You can not set to a row, but only to an object. If you want to remove the selection and want to return a row number, use this line. If you still want to keep the selection box, use RowNumber1. Both lines gives the same result.
RowNumber = Range("A110:D" & Range("A" & Rows.Count).End(xlUp).Row).SpecialCells(xlConstants, xlErrors).Row - 1
Sub Test()
Dim oSelect As Range, RowNumber As Long, RowNumber1 As Long
RowNumber = Range("A110:D" & Range("A" & Rows.Count).End(xlUp).Row).SpecialCells(xlConstants, xlErrors).Row - 1
Set oSelect = Range("A110:D" & Range("A" & Rows.Count).End(xlUp).Row)
RowNumber1 = oSelect.SpecialCells(xlConstants, xlErrors).Row - 1
End Sub
Bookmarks