ballgnm
New Member
- Joined
- Jan 16, 2023
- Messages
- 12
- Office Version
- 2021
- 2019
- 2016
- 2013
- Platform
- Windows
Hello, I'm making work related excel macro and intead of using Application.Calculation = xlCalculationManual, I'm using Sheets("sheetname").EnableCalculation = False to avoid "You broke something" kind of words. Because if it crashes or stops unintended way when calculation was set to manual, it stays that way for whole Excel program.
It's used by many people so I don't want to access their computers or go to their rooms everytime their excel calculation has turned into Manual so I have to make it automatic manually.
But later doesn't seem to calculate automatically and I can't tell if my calculation is done or not.
Because of that calculation-heavy sheets are not calculated properly.
Application.CalculationState always gives me xlDone state as 0. So checking this after Sheets("sheetname").EnableCalculation = true doesn't really help.
Is there any way to check if calculation process has ended?
Sheets have lot of formulas. It takes a lot of time to calculate so I have to disable calculation
similar to this thread VBA to ensure that workbook/worksheet(s) are calculated fully?
But there doesn't seem to have actual solution there.
It's used by many people so I don't want to access their computers or go to their rooms everytime their excel calculation has turned into Manual so I have to make it automatic manually.
But later doesn't seem to calculate automatically and I can't tell if my calculation is done or not.
Because of that calculation-heavy sheets are not calculated properly.
Application.CalculationState always gives me xlDone state as 0. So checking this after Sheets("sheetname").EnableCalculation = true doesn't really help.
Code:
Sheets("sheetname").EnableCalculation = True
Sheets("sheetname").Calculate
Debug.Print "sheetname: " & CStr(Application.CalculationState) 'gives me "sheetname: 0" even when calculation isn't finished yet.
Sheets("sheetname").EnableCalculation = False
Sheets have lot of formulas. It takes a lot of time to calculate so I have to disable calculation
similar to this thread VBA to ensure that workbook/worksheet(s) are calculated fully?
But there doesn't seem to have actual solution there.