Question about modal userform.....

R

Robert Crandal

My userform has various controls which allow the user
to enter data. (i.e textboxes, calendar control, etc...).
I load the userform as follows:

Userform1.Show
'
' Code here runs after userform is closed!
'

My question is....will the Visual Basic stop and wait
at the "Userform1.Show" line until the user is done
entering data and they close it out??? I'm just
worried that the form is loaded and that VBA
continues exiting the code below the "userform1.show"
line.

thankx
 
B

Bob Phillips

No, you are okay, the code flow is passed to the code in the form, and the
parent procedure continues when the form is exited.

HTH

Bob
 
C

Chip Pearson

If the form is shown modal (e.g., UserForm1.Show vbModal), execution
will not resume after the Show method until the form has been hidden
or unloaded. Note that when a modal form is displayed, its code can
display other modal forms but not modeless forms.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top