Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Resetting the activesheet used range

here is a routine from David McRitchie:

Sub Reset_all_lastcells()
'2002-08-02 based, David McRitchie, programming
' http://www.mvps.org/dmcritchie/excel...eanUpLastCells
'This macro will attempt to reset internals, based on a little trick
'involving usedrange.rows.count which may or may not work
'but would be nondestructive.
Application.Calculation = xlCalculationManual
Dim xlong As Long, cSht As Long
For cSht = 1 To ActiveWorkbook.Worksheets.Count
Worksheets(cSht).Select
xlong = ActiveSheet.UsedRange.Rows.Count + _
ActiveSheet.UsedRange.Columns.Count 'Tip73
Next cSht
ActiveWorkbook.Save
AbortCode:
'-- one of these is only done in macros make sure you exit thru here...
Application.Calculation = xlCalculationAutomatic

End Sub

Mike F
"Mark" wrote in message
...
Hi,

I am using EXCEL 97 at work, I have a large worksbook with about 200
worksheets in it.

The file size is quite large and having an impact on it's use because as

the
file is on a server some distance away, it's on a 1meg link but still

takes
some time to open.

I have tried reducing the fiule size with the CodeCleaner programme from

Rob
Bovey but that hasn't reduced it hardly any.

I wonder whether part of the problem is whether each spreadsheets used

range
is more than it needs to be.

Is there some code that someones got that can run and look at each

worksheet
throught the workbook and reset the usedrange?

Any assistance would be greatly appreciated.

Thanks

--
Mark A Whitehead



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 Spreadsheet1.ActiveSheet.Range("B1").LoadText debugging qa4ever Charts and Charting in Excel 0 January 2nd 06 09:52 PM
Resetting the end of a worksheet Cachod1 New Users to Excel 1 March 29th 05 07:44 PM
Resetting the activesheet used range Norman Jones Excel Programming 1 September 8th 04 11:57 AM
Used Range is not resetting R Avery Excel Programming 8 May 28th 04 11:31 AM
Resetting cells Sony[_3_] Excel Programming 5 February 4th 04 03:31 PM


All times are GMT +1. The time now is 01:40 AM.

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"