But the screen doesn't refresh, or stops refreshing at some point (e.g. The task eventually completes but the progress bar is useless. For i=1 to imax ' imax is usually 30 or so fraction Done=cdbl(i)/cdbl(imax) Application.
Status Bar = Format(fraction Done, "0%") & "done..." ' or, alternatively: ' status Range.value = Format(fraction Done, "0%") & "done..." ' Some code.......
Display Status Bar ''//Get the statusbar display setting Application.
Display Status Bar = True ''//Make sure that the statusbar is visible For i = 1 To i Max ''// imax is usually 30 or so fraction Done = CDbl(i) / CDbl(i Max) 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.
Here is a pic of the status bar while the macro is running.
I have an integer variable "ctr" whenever the value in the ctr is divisible by 100 I want the workbook to get saved. I have turned off calculations and screenupdating both.
Richard, I cannot paste the code coz you got look at my my excel file first which I cannot attach in this forum.
Screen Updating = False at the beginning of your code, then if any user runs the code, they will not know what is going on and think that the computer system is not responding.
I just want to ensure that after updating 100 rows, the workbook should get saved which I guess the line given by schielrn will help.
My Excel tool performs a long task, and I'm trying to be kind to the user by providing a progress report in the status bar, or in some cell in the sheet, as shown below.
The following code forces a user to enable macros in a workbook.
If a user opens the workbook and disables macros, only a warning sheet is displayed and all other sheets are hidden. The warning sheet asks the user to re-open the workbook and enable macros.