Excel application screenupdating does not work
Option Explicit Sub macro1() Dim i As Long, lrow As Long Application.
After the macro is finished, the status bar will show as follows – So similarly, you can update the status bar at different parts of the code, so that the user knows what is happening as the macro is running.
As there is no command in Excel to refresh a worksheet in the way a user form can be refreshed, it is necessary to use a trick to force Excel to update the screen.
Refresh Background Query:=False End With application.screenupdating = false With Active Sheet. Add(Connection:= _ "URL;" & File Path, _ Destination:=temp.
Status Bar = Format(fraction Done, "0%") & "done..." ' or, alternatively: ' status Range.value = Format(fraction Done, "0%") & "done..." ' Some code.......
Next i Sub Progress Meter() Dim boo Status Bar State As Boolean Dim i Max As Integer Dim i As Integer i Max = 10000 Application.
Here is a pic of the status bar while the macro is running.
Once we use at the end of the code, it will revert to the default Excel message which is READY.