Hello
I need to create a progress bar (i found the code on the web) for many macros (the macros are running in a sequence).
i have 4 subs, and i want that the progress bar will start when i click the button and will finish when the last macro will finish to run.
thank you
I need to create a progress bar (i found the code on the web) for many macros (the macros are running in a sequence).
i have 4 subs, and i want that the progress bar will start when i click the button and will finish when the last macro will finish to run.
Code:
Sub code()
Dim i As Integer, j As Integer, pctCompl As Single
Sheet5.Cells.Clear
For i = 1 To 100
For j = 1 To 1
Worksheets("sheet1").Cells(1, 1).Value = j
Next j
pctCompl = i
progress pctCompl
Next i
End Sub
Sub progress(pctCompl As Single)
UserForm2.Text.Caption = pctCompl & "% Completed"
UserForm2.Bar.Width = pctCompl * 2
DoEvents
End Sub
thank you