Lastrow - function not defined

  • Thread starter Thread starter seed
  • Start date Start date
S

seed

Borrowed this from Ron DeBruin's site but can't get it to work:

Dim SourceRange As Range, DestRange As Range
Dim DestSheet As Worksheet, Lr As Long
Set SourceRange = Sheets("Cart and Time Sheets").Range("l2:x2")
Set DestSheet = Sheets("tests")
Lr = LastRow(DestSheet)

Gets to the Lr line and gives me a sub or function not defined error. I'm
pretty well clueless and any help would be much appreciated.
 
Did you copy the function LastRow from Ron? It should come in a Module in
your VBA project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Copy to Next Blank Row 5
transfer macro 5
automatically run script 2
Copy information to the last row of another sheet in excel 2003 3
Copy to last row macro 4
Paste Special 2
Arrays and Loops 3
Weekly Totals 6

Back
Top