Solved

Progress bar

Posted on 2012-03-14
5
251 Views
Last Modified: 2012-03-16
Hi,

I have a user form that performs a few actions, some of these can take a few minutes. I want to show the user that something is happening as the egg timer flicks on and off.

I have previously used user forms to create a progress bar and updated that everytime a module finished. I dont really want to be building multiple user forms to show the progress.

Is there a simple way i cant show that something is happening to the user, then when the sub finished, the signal ends

Thanks
Seamus
0
Comment
Question by:Seamus2626
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:kgerb
ID: 37720364
I have used Alain's.  It's attractive and works well.  All the heavy lifting is already done.  You just have to implement it.

Article

Make sure you click 'yes' if you like it and use it.

Kyle
0
 
LVL 10

Expert Comment

by:Mez4343
ID: 37720381
What about using the Status bar in bottom left corner of excel window?

http://www.vbaexpress.com/kb/getarticle.php?kb_id=87
0
 

Author Comment

by:Seamus2626
ID: 37720442
Hey Mez, i would prefer something more visible.

Kyle, i dont understand how thias code will know when my sub has finished its actions?

Thanks
Seamus
0
 
LVL 12

Accepted Solution

by:
kgerb earned 500 total points
ID: 37720543
Seamus,
You have to configure the progress bar before you use it and tell it how many iterations you are going to run.  Then, while you are looping through your iterations you have to update the status of the progress bar.  

This example is copied directly from the article.
Sub wasteTime()
    Dim i As Long
    Dim diag As New ProgressDialogue
    diag.Configure "Wasting Time", "Now wasting your time...", -10000, 10000
    diag.Show
    For i = -10000 To 10000
        diag.SetValue i
        diag.SetStatus "Now wasting your time... " & i
        If diag.cancelIsPressed Then Exit For
    Next i
    diag.Hide
End Sub

Open in new window

Line 4 configures the progress bar with a title, a comment, a min value, and a max value.
Line 7 updates the progress bar with a new value.

Hope this helps.  If you need more explanation let me know.

Kyle
0
 

Author Closing Comment

by:Seamus2626
ID: 37728823
Thank you Kyle

All good
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question