Progress bar in excel, then call another macro

abadilala

New Member
Joined
Sep 29, 2017
Messages
27

<tbody>
[TD="class: votecell"]0down vote favorite
[/TD]
[TD="class: postcell"]I have 2 macro. One for progress bar, and the other one is the main process. The main process consist of 4 sub process inside.
What I want to do is the progress bar increase 25% for each process.
I have created the progress bar macro as below:

<code>Sub code() ' ' Macro1 Macro ' ' Keyboard Shortcut: Ctrl+p 'Sub code()

UserForm1.Show

End Sub

Sub progress(pctCompl As Single)

UserForm1.Text.Caption = pctCompl * 25 & "% Completed"

UserForm1.Bar.Width = pctCompl * 50
DoEvents

End Sub

Sub code_real()

Dim i As Integer, j As Integer, pctCompl As Single

Sheet1.Cells.Clear

For i = 1 To 4

For j = 1 To 10000

Cells(i, 1).Value = j

Next j

pctCompl = i

progress pctCompl

Next i

End Sub

</code>
My question is, how can I call main process macro while the macro for progress bar is running? I heard only 1 macro can be run at a time.

[/TD]

</tbody>
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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