Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mac Mac is offline
external usenet poster
 
Posts: 213
Default Tracking 'last written to' range

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Tracking 'last written to' range

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

"Mac" wrote in message
...
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



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
Array data to Range: Only first value written Post Tenebras Lux Excel Programming 4 June 29th 06 05:54 PM
How to insert tracking numbers into my webpage for RMA tracking wiglady Excel Discussion (Misc queries) 0 April 4th 06 12:44 PM
xla written in C# Torben Laursen[_2_] Excel Programming 4 August 4th 05 08:45 PM
Searching range for value (code written but needs 'tweaking'!) ian123[_26_] Excel Programming 8 December 23rd 03 05:19 PM
How to protect single cell or cells range from being over-written? Michael[_15_] Excel Programming 1 October 1st 03 04:50 AM


All times are GMT +1. The time now is 10:28 PM.

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

About Us

"It's about Microsoft Excel"