Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default improve DeleteBlankRows()

Ron de Bruin wrote:
Firstrow = ActiveSheet.UsedRange.Cells(1).Row
Lastrow = ActiveSheet.UsedRange.Rows.Count + Firstrow - 1


Thanks, I basically used that idea. But I wanted to keep the rest of
the code intact, so this is the section that sets the range from A1 to
the last used cell.

lastRow = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Row
lastCol = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Column
Set Rng = ActiveSheet.Range(Cells(1, 1), Cells(lastRow, lastCol))

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
Help improve mySchedule Please StevenPar Excel Discussion (Misc queries) 0 October 23rd 05 06:29 AM
Can you help me to improve this macro? Dario de Judicibus[_3_] Excel Programming 5 June 15th 05 10:59 AM
Improve code Gareth Excel Programming 5 April 20th 05 03:41 PM
How to improve visuality? Metallo[_3_] Excel Programming 6 October 8th 04 06:13 AM
How to improve this code? alainB[_21_] Excel Programming 4 May 22nd 04 11:20 AM


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