LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default File Size Increase Controlled, Question

Hi...I have a workbook with a macro and everytime I ran it, the file
size increased around 400KB, even though no new data was added to the
workbook. I did the last cell check on each worksheet and found it
was right at the edge of my data. I eliminated the macro module and
found no large decrease in file size. I eliminated the worksheets one
by one and found one worksheet MUCH larger in size than the others. I
incorporated some code at the end of the macro to remove this
worksheet and then readd a clean, fresh one back in, everytime the
macro runs. Now my workbook doesn't grow in size when I run the
macro.

I use the following code to paste web data on the offending worksheet.
I extract the data I want

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://xyz.com, _
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With

and then use the following to clean the worksheet prior to repeating
the process (about 1,500 times each time I run the macro).

Cells.Select
Selection.Delete
Range("A1").Select

Apparently some residue remains on the worksheet. If I do a rows -
delete, then save the workbook, the "crud" still remains. Can anyone
provide me with an explanation as to what this "crud" is?...TIA, Ron
 
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
Sudden Increase in File Size Jim May Excel Discussion (Misc queries) 3 November 12th 07 01:04 AM
File size increase Tania Excel Discussion (Misc queries) 1 January 31st 07 08:26 AM
File size increase Don4908 Excel Discussion (Misc queries) 6 December 22nd 06 08:10 AM
File Increase in size Martinj Excel Discussion (Misc queries) 7 November 7th 05 02:00 PM
File size increase Bill Clark Excel Discussion (Misc queries) 1 January 28th 05 06:57 PM


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