Copy information to the last cell of other sheet

E

Eduardo

I am trying to copy information in the first empty cell of other sheet called
Data. I've tried the macro as follow copied from Ron Debruin but I get a
compiling error"Sub or Function not defined". I'm new on this, can somebody
help me, thanks, Excel version 2003

Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
Lr = LastRow(Sheets("Data")) + 1
Set sourceRange = Sheets("Control").Cells( _
ActiveCell.Row, 1).Range("A6:l26")
Set destrange = Sheets("Data").Range("A" & Lr)
sourceRange.Copy destrange
End Sub
-
Eduardo from TO
 
F

fredg

I am trying to copy information in the first empty cell of other sheet called
Data. I've tried the macro as follow copied from Ron Debruin but I get a
compiling error"Sub or Function not defined". I'm new on this, can somebody
help me, thanks, Excel version 2003

Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
Lr = LastRow(Sheets("Data")) + 1
Set sourceRange = Sheets("Control").Cells( _
ActiveCell.Row, 1).Range("A6:l26")
Set destrange = Sheets("Data").Range("A" & Lr)
sourceRange.Copy destrange
End Sub
-
Eduardo from TO

You have posted this message to the wrong newsgroup.
The access in this groups name refers to Microsoft Access, a database
program.
Please repost to the correct newsgroup for the Excel program you are
using. I would suggest you include your Windows and Office version
number in the message.
 

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

Top