ducky801
asked on
Display Excel Form while VBA code runs
I have an excel workbook with a lot of custom code going on in it and it takes a while to calculate (5-7 seconds)
Because of this, instead of leaving calculation set to Automatic, I manage it with VBA as the user clicks around and does different things (toggling calculation on and off, and recalculating programmatically as necessary). All of this works fine.
As a nice-to-have, I'd like to display a form with a label on it that says "Calculating. Please wait" while the calc occurs so the user doesn't just think their computer is broken. Problem is, when I display such a form via code, the rest of the code doesn't complete until I close the form manually again (clicking on the X button). Is there a way around this?
In other words: is there a way to make the form run asynchronously from the code that displayed it?
AR
Because of this, instead of leaving calculation set to Automatic, I manage it with VBA as the user clicks around and does different things (toggling calculation on and off, and recalculating programmatically as necessary). All of this works fine.
As a nice-to-have, I'd like to display a form with a label on it that says "Calculating. Please wait" while the calc occurs so the user doesn't just think their computer is broken. Problem is, when I display such a form via code, the rest of the code doesn't complete until I close the form manually again (clicking on the X button). Is there a way around this?
In other words: is there a way to make the form run asynchronously from the code that displayed it?
AR
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome and I'm glad I was able to help.
Marty - MVP 2009 to 2012
Marty - MVP 2009 to 2012
ASKER