First time poster - have checked through previous threads without success but apologies if I've missed an answer to this.
I have a file (call it the Master file), which is about 25MB. I run a macro to copy 6 of the sheets from this file to another file (call it the Backup file). This file is 8MB, but the data in it is minimal and should only be about 100KB. [The live version of the file I am now developing does the same thing and produces a file of 500kb]. By copying out one sheet at a time (of the 6) I have isolated the sheet that causes the excessive file size, but I have no idea why. If the data from that sheet is manually copied and pasted out and saved, it's only 100kb. the code I am using to copy out the 6 sheets is as follows:
As you can see I break the links as well so that removes one potential cause IMO. The 2nd stage of the process is to copy one of the 6 sheets from the Backup file to another file (call it the Offer file). This could be any one of 4 sheets (and it's not the one I identified as causing the excessive file size. No matter which one is used though it ends up as 7-8MB even though it's a simple sheet of about 50kb.
The sheet that is causing it seems to be bringing some sort of "workbook level" formatting or issue with it, which isn't removed from the file if you delete the sheet that seems to have brought it.
I've checked the obvious things like excess formatting or anything like that.
I'm at my wits end here. Any help greatly appreciated.
I have a file (call it the Master file), which is about 25MB. I run a macro to copy 6 of the sheets from this file to another file (call it the Backup file). This file is 8MB, but the data in it is minimal and should only be about 100KB. [The live version of the file I am now developing does the same thing and produces a file of 500kb]. By copying out one sheet at a time (of the 6) I have isolated the sheet that causes the excessive file size, but I have no idea why. If the data from that sheet is manually copied and pasted out and saved, it's only 100kb. the code I am using to copy out the 6 sheets is as follows:
Code:
'select sheets and move them to new workbook
Sheets(Array("Fixed Offer", "Fixed Offer (annual)", "Pool Pass Through (annual)", "Pool Pass Through", "Secter", "Pricing", "Business Case Form")).Select
Sheets("Pool Pass Through (annual)").Activate
Sheets(Array("Fixed Offer", "Fixed Offer (annual)", "Pool Pass Through (annual)", "Pool Pass Through", "Secter", "Pricing", "Business Case Form")).Copy
Sheets("Pricing").Select
'Break links
ActiveWorkbook.BreakLink Name:=Source, Type:=xlLinkTypeExcelLinks
As you can see I break the links as well so that removes one potential cause IMO. The 2nd stage of the process is to copy one of the 6 sheets from the Backup file to another file (call it the Offer file). This could be any one of 4 sheets (and it's not the one I identified as causing the excessive file size. No matter which one is used though it ends up as 7-8MB even though it's a simple sheet of about 50kb.
The sheet that is causing it seems to be bringing some sort of "workbook level" formatting or issue with it, which isn't removed from the file if you delete the sheet that seems to have brought it.
I've checked the obvious things like excess formatting or anything like that.
I'm at my wits end here. Any help greatly appreciated.