K
kirkm
Here's an example I found on the web
---
Find the last used Row on a Worksheet:
Sub FindLastRow()
Dim LastRow As Long
If WorksheetFunction.CountA(Cells) > 0 Then
'Search for any entry, by searching backwards by Rows.
LastRow = Cells.Find(What:="*", After:=[A1], _
SearchOrder:=xlByRows,SearchDirection:=xlPrevious).Row
MsgBox LastRow
End If
End Sub
---
How do you tell Sub FindLastRow what worksheet to use ?
Also, is the above an OK method ?
Thanks - Kirk
---
Find the last used Row on a Worksheet:
Sub FindLastRow()
Dim LastRow As Long
If WorksheetFunction.CountA(Cells) > 0 Then
'Search for any entry, by searching backwards by Rows.
LastRow = Cells.Find(What:="*", After:=[A1], _
SearchOrder:=xlByRows,SearchDirection:=xlPrevious).Row
MsgBox LastRow
End If
End Sub
---
How do you tell Sub FindLastRow what worksheet to use ?
Also, is the above an OK method ?
Thanks - Kirk