LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Resetting Last Cell


I am a fond user of resetting last cell via the UsedRange property. My
favorite one is:

Sub ResetLastCel()
For each sh in Worksheets
sh.activate
x=Activesheet.UsedRange.Rows.count
Next
Sub

The above serves me well most of the time. There is however the odd 10%
(or so)chance of this failing and when it does, testing to locate the
last cell with *Cells.SpecialCells(xlCellTypeXlLastCell)* produces an
error. To convince myself that there are no false blank cells, I would
highlight and delete all rows beyond the "visible" usedrange.
Nothwithstanding this, the error persists.What gives?


David.


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=473521

 
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
Resetting cells to zero value. Ron New Users to Excel 5 April 26th 23 11:48 AM
Resetting cell format from TEXT to NUMERIC and DATE Tom Excel Discussion (Misc queries) 2 May 5th 08 05:43 AM
resetting last cell jagdish.eashwar Excel Discussion (Misc queries) 11 March 31st 06 02:06 AM
Resetting the end of a worksheet Cachod1 New Users to Excel 1 March 29th 05 07:44 PM
Used Range is not resetting R Avery Excel Programming 8 May 28th 04 11:31 AM


All times are GMT +1. The time now is 09:32 AM.

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"