logo
search
VBA & Macro Problems

How to Keep a Custom Excel Status Message Visible While Solver Runs

Maira MehtabMaira Mehtab Sep 22, 2026 868 views

Question details

The user needs to display custom progress messages during successive VBA calculations, but the default status-bar messages are continuously overridden by the Solver add-in.

Product
Microsoft Excel
Device & OS
not provided
Scenario
Running multiple successive optimization calculations using the Excel Solver add-in triggered via a VBA loop.
Observed behavior
Excel Solver automatically seizes control of the application's status bar while running, overwriting any custom Application.StatusBar messages set by the VBA script.
Before you start

Ensure that the Solver Add-in is enabled in your Excel application and that your workbook is saved as a Macro-Enabled Workbook (.xlsm) so your VBA scripts can execute properly.

Solution 1Recommended

Display Progress in a Dedicated Worksheet Cell

Since Solver takes over the status bar, outputting your custom progress messages directly to a specific worksheet cell is the most reliable way to maintain visibility.

By dedicating a cell (or a set of cells) to status updates, you avoid conflicting with Solver's built-in status bar updates. You must use the DoEvents command to force Excel to refresh the screen before Solver freezes the interface during its calculation phase.

1
Open the VBA Editor

Press Alt + F11 to open the Visual Basic for Applications (VBA) editor.

2
Assign the progress message to a cell

In your loop, right before calling Solver, write code to update a cell, such as: ThisWorkbook.Sheets("Sheet1").Range("A1").Value = "Running Task 1"

3
Force a screen update

Immediately after the cell update line, add the command 'DoEvents' on a new line to ensure the worksheet UI renders the text before Solver begins processing.

Advanced Data Analysis with WPS Office

Run Macros and Track Progress Efficiently in WPS Spreadsheet

WPS Spreadsheet features robust support for VBA macros and complex iterative calculations. You can seamlessly run your macro-enabled workbooks, automate data analysis, and output custom progress messages to worksheet cells without heavy system resource consumption.

  1. 1. Open your Macro Workbook: Launch WPS Spreadsheet and open the .xlsm file that contains your data and scripts.
  2. 2. Access the Developer Tools: Click on the Developer tab in the ribbon and select the VBA Editor to view your code.
  3. 3. Update your progress tracker: Modify your VBA script to print status updates to a dedicated cell instead of the status bar.
  4. 4. Execute your script: Run the macro and monitor your spreadsheet as the dedicated cell updates smoothly between iterations.
Fully compatible with Microsoft Excel macro formats (.xlsm)Lightweight architecture for faster processing of iterative loopsBuilt-in VBA editor with familiar debugging and execution tools
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel Solver overwrite my Application.StatusBar message?

The Excel Solver add-in is hardcoded to seize control of the application's status bar to display its own optimization progress, trial numbers, and objective cell values. This built-in behavior will always overwrite any custom text you pass to Application.StatusBar in VBA.

Can I use a UserForm to show progress while Solver is running?

Yes, you can create a modeless UserForm (using 'UserForm.Show vbModeless') in VBA. You can update a text label on this form to show progress (e.g., 'Task 2 of 10') and call DoEvents to force the form to redraw before calling the Solver function.

How do I force the screen to update my progress cell before Solver starts?

You must use the 'DoEvents' command in your VBA code immediately after the line that updates the worksheet cell or UserForm. This function pauses macro execution momentarily, forcing Excel to process queued screen updates before the CPU is handed over to Solver.