Some unusal phenomenon started affecting my macro. I have a relatively big (13MB) excel workbook. ThisWorkbook.Save
worked just fine. It took like 10 seconds to save the workbook (without any data changes). Now it takes for 2 minutes. Same goes for ThisWorkbook.Close SaveChanges:=True
. I am using Excel 2010
on Windows 7
.
The strange thing is I can save the workbook manually without any issues, like CTRL+S
or using the Save icon
in the Excel menu. This way the saving procedure takes less than 10 seconds just as my code used to do it.
The occurence of this unnecessary delay is really bugging me. Do you have any experience with an issue like this? I'm looking for tips to get an approach on the problem.
EDIT:
I've changed to xlsb
format as was advised and went a little further with testing. There are some cases when the saving time looks appropiate:
- Significant data changes in lots of sheets (48s)
- The
Save
command is triggered from a newly createdmodule
without any other changes (5s) - All my charts (150pcs) are deleted (1s). Apparently each chart gives about 1 extra second to the saving time. I know, i should use one dynamic but the damn label bugs... And it was totally fine before!
EDIT 2:
The issue has vanished today. Save
command works properly again, saving takes for only a few seconds. Dunno what caused the problem, but I am affraid it will be back and will affect my macro some day again. Excel is definitely quirky!