ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Question about modal userform..... (https://www.excelbanter.com/excel-programming/438760-question-about-modal-userform.html)

Robert Crandal

Question about modal userform.....
 
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




Bob Phillips[_4_]

Question about modal userform.....
 
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

"Robert Crandal" wrote in message
...
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






Chip Pearson

Question about modal userform.....
 
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]



On Sat, 23 Jan 2010 01:18:56 -0700, "Robert Crandal"
wrote:

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




All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com