Dr. Demento
Well-known Member
- Joined
- Nov 2, 2010
- Messages
- 618
- Office Version
- 2019
- 2016
- Platform
- Windows
I like the idea of using a optimization sub instead of re-typing all the off/on switches for calculation, screen updating, etc (see Procedure for increasing VBA performance).
It usually works great, except that every once in a while I get an error on this line:
[RTE 1004: Method "Calculation of Object" _Application failed] I have this code in Personal.xlsb, ThisWorkBook, in a Private Sub Workbook_Open macro so that all of these items get turned on when I first open Excel and in Private Sub Workbook_BeforeSave to turn them off and then on surrounding a Save of personal.xlsb.
I 'm trying to replicate the error message but it's working fine right now (like a car at the mechanics!!), although it seems most prevalent when I open Excel for the first time. Any thoughts why that would throw an error??
It usually works great, except that every once in a while I get an error on this line:
Code:
Application.Calculation = IIf(isOn, xlCalculationManual, xlCalculationAutomatic)
I 'm trying to replicate the error message but it's working fine right now (like a car at the mechanics!!), although it seems most prevalent when I open Excel for the first time. Any thoughts why that would throw an error??