First I have dealt with the .exd issue, but since the update my spreadsheet is acting strange.
Background:
This spreadsheet started as a 2003 workbook with no macros or vba. It had some 35 - 40 spreadsheet used as user interfaces or calculation tables. As the options were expanded it got macros. (First time for me, an old time procedural programmer.) Not elegant but they worked. That wasn't enough so on to UserForms and VBA. The spreadsheet grow to 16mb without data. Strange things happened periodically, so I moved it to Excel 2010. It went from 16mb to less than 4mb.
Currently:
I recently added some additional features and wanted to address the speed with more vigor. I have been turning Calculations from Auto to Manual etc. for some time with success, but my UDF struggle sometimes to be current. Therefore I sprinkled in a few .calculate.full statements.
Most likely because of my coded skills the calculations got out of hand. So I deleted all of my Application.calculations = statements and replaced them with a routine from Kenneth Hobs called SpeedOn and SpeedOFF.
With Application
. Calculation = glb_origCalculationMode
. ScreenUpdating = True
. EnableEvents= true
. DisplayAlerts = true
. CalculateBeforeSave = true
.Cursor = xlDefault
.StatusBar = false
.EnableCancelKey = xlInterrupt
End with
Above is SpeedOn code, SpeedOff toggle these items. I put in a test to insure that SpeedOn was not called twice in a row as this would set the calculation to manual for good.
There is a great deal of interaction between the spreadsheet and VBA.
With this addition the program crawls. Significantly worse than before. Why?
Background:
This spreadsheet started as a 2003 workbook with no macros or vba. It had some 35 - 40 spreadsheet used as user interfaces or calculation tables. As the options were expanded it got macros. (First time for me, an old time procedural programmer.) Not elegant but they worked. That wasn't enough so on to UserForms and VBA. The spreadsheet grow to 16mb without data. Strange things happened periodically, so I moved it to Excel 2010. It went from 16mb to less than 4mb.
Currently:
I recently added some additional features and wanted to address the speed with more vigor. I have been turning Calculations from Auto to Manual etc. for some time with success, but my UDF struggle sometimes to be current. Therefore I sprinkled in a few .calculate.full statements.
Most likely because of my coded skills the calculations got out of hand. So I deleted all of my Application.calculations = statements and replaced them with a routine from Kenneth Hobs called SpeedOn and SpeedOFF.
With Application
. Calculation = glb_origCalculationMode
. ScreenUpdating = True
. EnableEvents= true
. DisplayAlerts = true
. CalculateBeforeSave = true
.Cursor = xlDefault
.StatusBar = false
.EnableCancelKey = xlInterrupt
End with
Above is SpeedOn code, SpeedOff toggle these items. I put in a test to insure that SpeedOn was not called twice in a row as this would set the calculation to manual for good.
There is a great deal of interaction between the spreadsheet and VBA.
With this addition the program crawls. Significantly worse than before. Why?