Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Lastrow - function not defined

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 396
Default Lastrow - function not defined

Did you copy the function LastRow from Ron? It should come in a Module in
your VBA project.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"seed" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Lastrow - function not defined

Well! Of course not! That clears things up a bit :)

Thanks

"Wigi" wrote:

Did you copy the function LastRow from Ron? It should come in a Module in
your VBA project.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"seed" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lastrow Mr. Damon[_2_] Excel Worksheet Functions 3 July 30th 08 04:12 PM
HELP Lastrow Range Mr. Damon Excel Discussion (Misc queries) 1 July 29th 08 01:21 PM
LastRow of Data phmckeever Excel Worksheet Functions 1 December 1st 06 09:04 PM
Type mismatch on LastRow daniel chen Excel Discussion (Misc queries) 8 April 11th 05 02:29 AM
Lastrow in Range Jeff Excel Discussion (Misc queries) 2 December 17th 04 04:53 PM


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"