JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
My model is laden with many Application.Wait Now + Timevalue statements so that VBA can finish processing before moving to dependant calculations.
The main issue is that the TimeValue on Monday can be 30 seconds and on Saturday can be 2 minutes.
What I would like to do is change those Application.Wait Now + Timevalue statements to something a bit more precise.
So I am looking at the xlCalculationState property.
With VBA & Excel, I understand that this property works great. However, I also have a considerable number of PQ processes sprinkled through the VBA code.
Does the xlCalculationState property also work when a PQ is still running?
I am looking at something like this to pause VBA Macro execution:
Do
DoEvents
Application.Calculate
Loop While Not Application.CalculationState = xlDone
Thanks in advance
My model is laden with many Application.Wait Now + Timevalue statements so that VBA can finish processing before moving to dependant calculations.
The main issue is that the TimeValue on Monday can be 30 seconds and on Saturday can be 2 minutes.
What I would like to do is change those Application.Wait Now + Timevalue statements to something a bit more precise.
So I am looking at the xlCalculationState property.
With VBA & Excel, I understand that this property works great. However, I also have a considerable number of PQ processes sprinkled through the VBA code.
Does the xlCalculationState property also work when a PQ is still running?
I am looking at something like this to pause VBA Macro execution:
Do
DoEvents
Application.Calculate
Loop While Not Application.CalculationState = xlDone
Thanks in advance