Generic routine to display progress bar
I'm not sure how to ask this question, but there are times when you want to display a progress bar; e.g., to show the number of records that have been processed as a percentage on a moving bar chart. Everything that I've seen calls for imbedding the code that is processing the records within the userform activate module. That means that you have to have different code for every 'progress bar' that your displaying, even though you may be using an identical userform. Is there a way to call a procedure that shows the userform and uses passed parameters to show the progress? Sorry if this is not clear but I hope you know what I'm asking. Thanks.
Re: Generic routine to display progress bar
I think I understand what you want to accomplish but before I post any code I want make sure.
- You want a Generic ProgressBar UserForm that you can display.
- This UserForm must be able to call a subroutine that would adjust the bar's parameters.
- The name of the adjusting subroutine would be passed as an argument to the UserForm for it to execute as opposed to having to hard code that subroutine into the UserForm.
Is this is what you mean, then this can be accomplished using the CallBack API function. Please let me know if this what you intended and I will post an example.