ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to evaluate the size of each worksheet in a workbook? (https://www.excelbanter.com/excel-programming/396083-how-evaluate-size-each-worksheet-workbook.html)

[email protected]

How to evaluate the size of each worksheet in a workbook?
 
I have a 30+ worksheets in a workbook that is to big....
I would like to know which one are the top memory eater, so I can
concentrate my effort on these one.

Thanks for your help


joel

How to evaluate the size of each worksheet in a workbook?
 
The code below will save each worksheet to a sperate file using the sheet
name as the filename. hen compare the filesizes to see which sheets are the
largest.


Sub CopySheets()
'
' Macro2 Macro
' Macro recorded 8/22/2007 by Joel
'

'
Const SavePath = "c:\temp\"
testnumber = 1

For Each ws In Worksheets

Worksheets(ws.Name).Copy
ActiveWorkbook.SaveAs Filename:=SavePath & ws.Name
ActiveWorkbook.Close
testnumber = testnumber + 1

Next ws
End Sub

" wrote:

I have a 30+ worksheets in a workbook that is to big....
I would like to know which one are the top memory eater, so I can
concentrate my effort on these one.

Thanks for your help




All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com