Ending the userforms after use
I have UserForms with the name of Error. To display to the user I declare the script like this: UserForms.Error.ShowMOdal;
After displaying the Forms, the user selects the test that will begin, and click Continue. At this point my test begins. but the
UserForms continues to show in the background. Does anyone know how I can finish it. I've tried several ways but could not.
The way you have this set up, the user form will not close until the procedure has run. (All of the code in the OnClick event has to complete before the modal result of mrOK will occur which results in the form closing.)
Within the OnClick event, set some project suite variables based upon the items checked on the form, etc. that are needed to run the other tests you are currently calling from within the OnClick event. Then move the code that runs those other tests outside of the OnClick event. Once the variables are set, the form will close and then the other tests can run.
You could also try UserForms.MyForm.Hide, but I find that this doesn't always work.