S
Sige
Hi There,
How comes Range = Nothing?
I would like the message box to show something like: F125
Thanks, Sige
Sub Show_Usedrange()
Dim lngLastRow As Long
Dim rLastRowCell As Range
On Error Resume Next
lngLastRow = 1
With ActiveSheet.UsedRange
lngLastRow = .Find("*", .Cells(1), xlFormulas, xlWhole,
xlByRows, xlPrevious).Row
Set rLastRowCell = Cells(lngLastRow + 1, 6)
MsgBox rLastRowCell
End With
End Sub
How comes Range = Nothing?
I would like the message box to show something like: F125
Thanks, Sige
Sub Show_Usedrange()
Dim lngLastRow As Long
Dim rLastRowCell As Range
On Error Resume Next
lngLastRow = 1
With ActiveSheet.UsedRange
lngLastRow = .Find("*", .Cells(1), xlFormulas, xlWhole,
xlByRows, xlPrevious).Row
Set rLastRowCell = Cells(lngLastRow + 1, 6)
MsgBox rLastRowCell
End With
End Sub