I have appx 20 private subs and they are each associated to a form button. Is there a way to create a macro/module/code that will run all of the Subs sequentially, that I can assign to a single form button? I would also like to have a progress bar, so the user doesn't think the system is locked up.
Move all the code into one sub ?
Put a counter in and increment it by 1 each time one of the tasks is complete, change a label caption to indicate x out y processes complete.
Each of my subs run a loop, and I tried combining them, but it gave me a compile error. Each sub is looping through a different query and creating a pdf report by state and exporting them to a specific network drive. Also, I don't know how to write the progress bar code.
My knowledge in VBA is only what I have taught myself by trial and error and what I have learned here.
The trick I use in these cases is pretty straight forward. To elaborate on what Minty posted,
1) Put a label on your form called "Lbl_Progress"
2) In your button code where you will be calling each sub, do the following before each sub is called