Tracking 'last written to' range

  • Thread starter Thread starter Mac
  • Start date Start date
M

Mac

With Sheet1 in focus and data displayed in a modeless user form, I want to
'send' some of this data to Sheet2; as I do this repeatedly, every time I
'send' the data I want it to go to a new row, but as Sheet2 is not in focus I
do not not know the address of the next available range. So my question is:

How do I kepe track of the 'last written to' range?

1. Is there some global function to his?
2. Do I have to do check for this from inside Sheet2 and then call this
function from the user form?

Mac
 
If you are writing to column A

Dim jLastRow as long

jLastRow=worksheets("Sheet2").Range("A65536").end(xlup).row

will get you the last non-blank entry.

Charles
__________________________________________________
The Excel Calculation Site
http://www.decisionmodels.com
 

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