Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Blank Rows at end of Worksheet

I've written a custom macro that manually sorts the rows
in my spreadsheet into custom sections. I use the Cut and
Paste methods to move rows from the bottom of my sheet to
the appropriate section. However, after I run the macro I
end up with additional blank rows at the end of the sheet.
I tried selecting the rows and deleting them, but they
still show up. This causes a problem when printing since
the blank rows get included. If I run the macro 10+ times,
I end up with thousands of blank lines at the end. Any
idea on how to get rid of these blank lines?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Blank Rows at end of Worksheet

Have you tried resetting the usedrange. It might work.

Try
set rngTemp = activesheet.usedrange
set rngTemp = nothing
msgbox(activesheet.usedrange) ' to test

Alternatively, delete the excess rows and reset your print area.

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Neil" wrote in message
...
I've written a custom macro that manually sorts the rows
in my spreadsheet into custom sections. I use the Cut and
Paste methods to move rows from the bottom of my sheet to
the appropriate section. However, after I run the macro I
end up with additional blank rows at the end of the sheet.
I tried selecting the rows and deleting them, but they
still show up. This causes a problem when printing since
the blank rows get included. If I run the macro 10+ times,
I end up with thousands of blank lines at the end. Any
idea on how to get rid of these blank lines?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Blank Rows at end of Worksheet

Debra Dalgleish has some techniques documented at:
http://www.contextures.com/xlfaqApp.html#Unused

Neil wrote:

I've written a custom macro that manually sorts the rows
in my spreadsheet into custom sections. I use the Cut and
Paste methods to move rows from the bottom of my sheet to
the appropriate section. However, after I run the macro I
end up with additional blank rows at the end of the sheet.
I tried selecting the rows and deleting them, but they
still show up. This causes a problem when printing since
the blank rows get included. If I run the macro 10+ times,
I end up with thousands of blank lines at the end. Any
idea on how to get rid of these blank lines?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Blank Rows at end of Worksheet


Using the UsedRange method helped remove the blank rows when printing,
but they still exist on the sheet and continue growing. Instead of
having 200 rows of data, the sheet thinks it's got 1600 rows of data. It
makes using the scroll bar near impossible.

I tried simply deleting the blank rows manually and via code, but
neither had an impact. Any way to reset the rows so the scroll bar on
the right-hand side doesn't think there is data in the blank rows?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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
Removing blank columns and rows from worksheet therrin Excel Discussion (Misc queries) 1 March 27th 08 07:56 PM
open new blank worksheet with over 65,000 rows EBrant New Users to Excel 2 July 19th 07 04:23 PM
How do I insert blank rows between rows in completed worksheet? bblue1978 Excel Discussion (Misc queries) 1 October 26th 06 07:02 PM
Delete ANY blank rows on worksheet Anita Excel Discussion (Misc queries) 7 August 31st 06 05:41 PM
Removing blank rows in a worksheet Louise Excel Worksheet Functions 6 May 26th 05 02:21 PM


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