Vba keep info that macro is running in Excel

For example, I have a macro that takes couple of minutes to execute as it processes voluminous information - sometime it is not clear during waiting if the macro is actually running. Is ther a way for me to get status?

To do it in Excel, here is the answer:

  1. Option Explicit
  2. Sub SubRoutineSample()
  3. Dim i As Long
  4. For i= 2 to 20000
  5. Application.StatusBar = "Processing Record " & i
  6. ' complex
  7. ' macro
  8. ' function
  9. ' goes here
  10. Next i
  11. Application.StatusBar = False
  12. End Sub


a) Line 5 - When execution happens, StatusBar at the bottom left of Excel window is updated with details of record being processed. This information helps ascertain the processing status of macro.

excel vba keep info that macro is running

b) Line 11 - To return control of the status bar back to Excel, set its value to FALSE.


You can find similar Excel Questions and Answer hereunder

1) Import txt file in Excel

2) How can I filter and copy only filtered data using VBA?

3) How to do webscrapping in VBA. Here some basics

4) How to do workbook protection with VBA in Excel

5) How can I export a WorkSheet as a PDF using VBA?

6) How can I remove display of Gridlines in my worksheet using VBA?

7) How can I clear cell after activating a routine when there is a change in value of a cell?

8) How do I use Find to determine last occurrence of a string in a WorkSheet range using VBA?

9) How can I dynamically add a hyperlink using VBA?

10) How can I convert Column numbers into Column names for use in range definition?


Here the previous and next chapter