Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default How do I reset the LastUsed cell reference from code.


I've a shared workbook and need to print a report from it.
I've set a sheet up with 2 header rows.
For each row of data I insert a new row 3 and copy the data to be printed to
it.
When all the data has been transferred I sort the sheet and set the print
range as
"A1:K" & LastUsed.Rows(Count)
I print the sheet and delete the data.
The more the sheet is used, the more I get 1 or 2 sheets with data on them
and more and more blank sheets.
Also, as the sheet size is increasing each time, the workbook takes longer
and longer to load and save.
As it's in a shared file, XL will not allow deletion of the sheet.

So, I need to know how to reset the LastUsed Cell to (say) K3
or if there is another way around this problem.
(There's usually another way any problem, the problem is knowing it!)

TIA
Henry

--
^^You think you've made it idiot-proof, then along comes a fully qualified
idiot!^^


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default How do I reset the LastUsed cell reference from code.

Henry, have a look here and see if this will help
http://www.mvps.org/dmcritchie/excel/lastcell.htm

--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"Henry" wrote in message
...

I've a shared workbook and need to print a report from it.
I've set a sheet up with 2 header rows.
For each row of data I insert a new row 3 and copy the data to be printed

to
it.
When all the data has been transferred I sort the sheet and set the print
range as
"A1:K" & LastUsed.Rows(Count)
I print the sheet and delete the data.
The more the sheet is used, the more I get 1 or 2 sheets with data on them
and more and more blank sheets.
Also, as the sheet size is increasing each time, the workbook takes longer
and longer to load and save.
As it's in a shared file, XL will not allow deletion of the sheet.

So, I need to know how to reset the LastUsed Cell to (say) K3
or if there is another way around this problem.
(There's usually another way any problem, the problem is knowing it!)

TIA
Henry

--
^^You think you've made it idiot-proof, then along comes a fully qualified
idiot!^^




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default How do I reset the LastUsed cell reference from code.

Paul,

Thanks for that.
I should be able to sort it from there and
J-Walk's tip 73

Henry

"Paul B" wrote in message
...
Henry, have a look here and see if this will help
http://www.mvps.org/dmcritchie/excel/lastcell.htm

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



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
Reset button code for Radio Buttons [email protected] Excel Discussion (Misc queries) 6 August 25th 12 03:09 PM
Use text from a cell reference in vba code. JackyJ Excel Discussion (Misc queries) 1 October 4th 10 07:57 AM
VBA code for find function (reference cell value) emil Excel Worksheet Functions 0 May 5th 09 01:57 AM
Hyperlink reference seems to reset to A1 overnight? TSW632 Excel Discussion (Misc queries) 0 February 5th 09 04:10 PM
vb code for renaming a work sheet with a cell reference John Britto Excel Discussion (Misc queries) 3 September 17th 06 07:12 PM


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

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

About Us

"It's about Microsoft Excel"