Simulate progress bar when userform shows

Dezlav

New Member
Joined
Sep 23, 2017
Messages
1
I have this userform that shows when opening the work book, it displays my contact info along with some information of the macro file (version, date modified, etc.)

I want to add a fake loading bar to this userform to make it look less annoying for the user. The main point of this userform is to show my contact info in case the one who uses it has another project for me. I am guessing that they will eventually put another guy to do this job and they will hand him this file.

First this is what I use to make the userform show when opening the book:
Code:
Private Sub Auto_Open()    Startup.Show
End Sub

Next this is what I use to start the progress bar simulation, which is just a call for another sub
Code:
Private Sub Userform_Initialize()

Call Loader


End Sub

This is the actual thing that simulates the bar
Code:
Public Sub Loader()
Application.Wait (Now + TimeValue("0:00:05"))


Startup.Porcentaje.Caption = "Cargando 1% Completado"
Startup.Barra.Width = 3
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 3% Completado"
Startup.Barra.Width = 8
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 9% Completado"
Startup.Barra.Width = 23
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 15% Completado"
Startup.Barra.Width = 39
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 28% Completado"
Startup.Barra.Width = 72
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 35% Completado"
Startup.Barra.Width = 90
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 48% Completado"
Startup.Barra.Width = 124
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 67% Completado"
Startup.Barra.Width = 172
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 88% Completado"
Startup.Barra.Width = 227
Application.Wait (Now + TimeValue("0:00:01"))


Startup.Porcentaje.Caption = "Cargando 99% Completado"
Startup.Barra.Width = 255
Application.Wait (Now + TimeValue("0:00:03"))


Startup.Porcentaje.Caption = "Cargando 100% Completado"
Startup.Barra.Width = 258
Application.Wait (Now + TimeValue("0:00:03"))


End Sub


This actually works, problem here is that when I open the file it freezes on the Excel loading screen until the userform ends faking the progress bar.

Any other way to get the task done?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
In the properties for your form set the ShowModal to False
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top