I have a two-part process that is triggered via a button, and I'd like to show the user information about how far along the process is using the status bar.
Right now, I have the workbook show one message while the workbook rebuilds and recalculates via:
And then a second process that runs a loop of code that displays the total percent completed via:
I'd like to show a similar "PercentComplete" while the workbook does the FullRebuild from within the status bar, rather than (or supplementary to) the Calculating... xx% that it shows already.
It's a minor thing, as the whole process only takes a maximum of about 10 seconds (big workbook, several UDFs, lots of data), but I'm just curious if it can be done. I feel like there should be something like xlCalculationProgress in VBA somewhere, but can't seem to find it. Any help is, as usual, greatly appreciated. Thanks,
- Bill
Right now, I have the workbook show one message while the workbook rebuilds and recalculates via:
Code:
Application.StatusBar = "Recalculating Workbook, Please Wait (Process 1 of 2)"
Application.CalculateFullRebuild
Do Until Application.CalculationState = xlDone
DoEvents
Loop
And then a second process that runs a loop of code that displays the total percent completed via:
Code:
For I = 5 To LastRow + 4
PercentComplete = (I / (LastRow + 4)) * 100
Application.StatusBar = ("Calculating Values, " & PercentComplete & "% Complete, Please Wait (Process 2 of 2)")
I'd like to show a similar "PercentComplete" while the workbook does the FullRebuild from within the status bar, rather than (or supplementary to) the Calculating... xx% that it shows already.
It's a minor thing, as the whole process only takes a maximum of about 10 seconds (big workbook, several UDFs, lots of data), but I'm just curious if it can be done. I feel like there should be something like xlCalculationProgress in VBA somewhere, but can't seem to find it. Any help is, as usual, greatly appreciated. Thanks,
- Bill