The userform and codes linked to by, or shown on, this page remain the copyrighted material of Abbydale Systems. You are free to use the material but please honor the copyrights. The usual disclaimers apply.

 
 
  Implementing a Progress Screen  
 

Sample Screen Shot
Sample screen shot of the progress screen described on this page.

The progress screen is useful to use with long running VB code within a spreadsheet, especially if screen updating is turned off. (Screen updating can negatively affect the performance of the VB code).

It may seem obvious but there is no point in having a progress screen for short running code. So the first thing you need to do is to assess if there is an actual need for one! We use a progress screen just to show users that something is still happening under the covers, especially when using the SAP interface (AFE).
Of course displaying the screen slows the program down a little, but it is often better to show people that something is happening rather than have them wonder if something has gone awry.

So off we go...this is how to do it.

 
 

Link To Progress Userform

Link To Demo Code

The first step is to add a userform to the workbook. This is done by opening the Developer tab in Excel.
If you don't see it on the ribbon then you need to activate/add it. If you need help on how to do this click here to see a video demonstrating the process.
 
 


How to Import the Demo Code Video

Once the "Developer" tab has been activated you then need to design your Progress user form. If you prefer you can simply download ours from the link above and import it.

If you need instructions as to how to import the user form and the sample demo code (also available from the link on this page.) then the video alongside is provided to demonstrate how to do this.
 
 




Adding a Button Demonstration Video

The next step is to add a button to a spreadsheet which will run the code. If you don't know how to add a button, the video on the left will demonstrate how to do this.

You will notice that when we assign which code to run when the button is clicked that there are two procedures (RunIt & StartItOff) to chose from.

The one to select to process when the button is clicked should be StartItOff
 
 

RunIt is the main program, this is the one that will update the userform as it processes.

StartItOff is the process that will run when the button is clicked. It is this one that should be associated with the button.

If you examine the events associated with the userform you will see an event that is processed when the form is activated. The code wthin this event invokes the RunIt procedure.

StartItOff simply displays the userform, but because the button activates the userform, the RunIt procedure gets started.

One point to note is that the "Close" button on the userform is hidden until the very last display, however, you can always close the form by using the X.

Do not omit the DoEvents statement from the code, otherwise the userform will not update.

That is it. You now have a progress form.
 
 
 


If you need any support or assistance with any of the code on this site
or
if you would like to contact us, please click here

follow us on facebook
Follow us on Facebook

 

Number of unique visitors 586

Copyright © Abbydale Systems LLC 2015-2024

Abbydale Systems LLC Lic. 802696149. All rights reserved.

Last modified : Sunday 19th of September 2021