Copying automatically to the next free cell

  • Thread starter Thread starter Cyberics
  • Start date Start date
C

Cyberics

Worksheet.
One tab with a pricelist. Another with an orderform.
When you click on a (order)button next to each item it copies(macro
the description of an item to the orderform.
Question: How can I let Excel automatically copy the next ordered
item to the next free cell(Line 2 or 3, etc) in the orderform
 
Cyberics, add a line of code something like this, it will start at A65536
and come up till it finds an empy cell
Range("A65536").End(xlUp).Offset(1, 0).Select

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 
Thanks Paul!
I am really green in programming. Maybe you can tell me also how t
change to the other sheet.(called "orders")

Is it something like
Range("Orders":"A8").End(xlUp).Offset(1, 0).Select

Thanks for your help
 
Cyberics, try this

Sheets("orders").Select
Range("A65536").End(xlUp).Offset(1, 0).Select

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 
Hi Paul,

When I use
Sheets("orders").Select
It moves to the orderform

And when I use
Range("A65536").End(xlUp).Offset(1, 0).Select
It looks for the free cell.

BUT when I use both
Sheets("orders").Select
Range("A65536").End(xlUp).Offset(1, 0).Select

It comes up with an error 1004.
Selection method of the Range class is not correct
(I am using a Dutch Excel, so forgive the poor translation)
So I think I need another way of entering the data?

Thanks in advance!

Peter. (Cyberics)

Paul said:
Cyberics, try this

Sheets("orders").Select
Range("A65536").End(xlUp).Offset(1, 0).Select

--:) :
 

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

Back
Top