View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed from AZ Ed from AZ is offline
external usenet poster
 
Posts: 120
Default Help with DoEvents to show progress form, please?

I've got a pretty long-running macro inside a UserForm, and I wanted
to open a second form just to show that things are still working and
not crashed. It's pretty simple - four labels and I cycle around
turning one at a time a different color.

I call it from the main form with
Private Sub CommandButton1_Click()

DoEvents
frmWaiting.Show vbModeless
DoEvents

Unfortunately, once the code drops into the second form, the main code
in the first form never executes.

I thought DoEvents was supposed to let the running code "drop through"
to allow both forms to run their code. Obviously, I'm very
incorrect!! 8(

How can I make this happen correctly?
Ed