-
-
The code has to go in the code section for the progress bar user form. If your code has a loop, you can update the progress bar on each iteration, otherwise, you can estimate the progress throughout the code and update accordingly.
-
Ok...I have no loop, so would need to estimate.
Here is the code:
[VBA]
Option Explicit
Sub StatusBar()
Dim x As Integer
Dim MyTimer As Double
'Change this loop as needed.
For x = 1 To 250
'Dummy Loop here just to waste time.
'Replace this loop with your actual code.
MyTimer = Timer
Do
Loop While Timer - MyTimer < 0.03
Application.StatusBar = "Progress: " & x & " of 250: " & Format(x / 250, "Percent")
DoEvents
Next x
Application.StatusBar = False
End Sub
[/VBA]
How would I amend this/add to my code to allow me to estimate this??
Thanks,
Me
We're a Kingdom, and we're United!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules