Show % Calculated in Status Bar?

BBrandt

Board Regular
Joined
Jul 14, 2008
Messages
155
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:

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
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top