How to create progress bar in Excel with vba

How to create a progress bar or indicator in Excel with VBA. Often when we load large Excel workbooks or perform large calculations on hundreds of thousands of worksheet cells, Excel might appear to hang. To let the user know that the things are working fine we can create a progress bar. Such a progress bar or indicator can be easily created using a looping process or a timer. Watch the video below to learn how to create an elegant progress bar using two labels on a user-form.

Watch this video on YouTube.

Here’s the complete VBA code to build a progress indicator:

Private Sub Workbook_Open()
End Sub

Private Sub UserForm_Activate()
Dim remainder As Long
Dim i As Long, j As Long
remainder = 0
For i = 1 To 200

UserForm1.Label2.Width = UserForm1.Label2.Width + 1
If i Mod 2 = 0 Then
remainder = remainder + 1
UserForm1.Caption = remainder & ” % complete”
UserForm1.Label2.Caption = remainder & “%”
End If
For j = 1 To 600
Next j
Next i
MsgBox “Loading of program complete.”
Unload UserForm1
End Sub

Download the sample file:

Further reading:

How to create a progress bar

Published by

Dinesh Kumar Takyar

Welcome to! My aim is to help you learn MS Excel including VBA. I always felt that a good way to learn something was to find solutions to problems in that domain. That is why I share these Excel videos with you. Mostly these are questions asked during my corporate training sessions. I've been training individuals and companies in computers since 1991. I did my B. Sc. (Vordiplom), M. Sc. (Diplom) and Ph.D. (Dr. rer. nat.) from Hamburg, Germany. The best thing about solving some of my visitor's questions is that I also gain new insights. For more Excel VBA solutions you may like to visit my YouTube channel: For a structured Excel VBA training course online you can visit:

One thought on “How to create progress bar in Excel with vba”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.