Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lastrow | Excel Worksheet Functions | |||
HELP Lastrow Range | Excel Discussion (Misc queries) | |||
LastRow of Data | Excel Worksheet Functions | |||
Type mismatch on LastRow | Excel Discussion (Misc queries) | |||
Lastrow in Range | Excel Discussion (Misc queries) |