LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Deleting Rows

I agree that my code is slow, and look forward to trying Tom's suggestion.
I am surprised that saving a file resets the used range as in my experience
on opening a file, "used range" gives the wrong values.

"Tom Ogilvy" wrote:

Are you using excel 97. If not, then I use this all the time and it works.
If it doesn't work for you, then try saving the workbook after you do what I
suggested but not closing and opening it. If that doesn't work, then I
guess you will have to close and open it, but that hasn't been my experience.

Gleam is providing some slow code to discover the rows and columns to be
deleted, but never actually resets the usedrange. I assumed you already knew
that and emphasized the fact that you actually need to delete entire rows and
columns that were unused before resetting the range.

Debra Dalgleish has faster code to do this:
http://www.contextures.com/xlfaqApp.html#Unused

Note that she advocates saving the workbook to reset the range, but as I
said, I haven't found that to be necessary in later versions of excel if you
executed the command
Activesheet.usedrange
after deleting entire rows and columns of unused space.
--
Regards,
Tom Ogilvy


"Posse John" wrote:

For whatever reason, Excel doesn't 'reset' the usedrange until you save and
reopen the workbook...

I'm trying to 'reset' it programatically.

 
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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
Help!!! I have problem deleting 2500 rows of filtered rows shirley_kee[_2_] Excel Programming 1 January 12th 06 03:15 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM


All times are GMT +1. The time now is 07:12 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"