Find last row code

M

Mike Milmoe

I have the following code to find the last row with data. It works
perfectly. However, how can I make it work on any sheet, essentially the
active tab, as opposed to a specific sheet as in the below example.

Sheets("HI01").Cells(Last(1, ActiveSheet.Cells), "m").Select
 
D

Dave O

Try this:
Sheets(activesheet.name).Cells(Last(1, ActiveSheet.Cells),
"m").Select
 
M

Mike Milmoe

Thanks Dave. This worked great. Sorry about the multiple postings.
Couldn't see my question.
 
Top