Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default 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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform modal Dave K[_3_] Excel Discussion (Misc queries) 1 April 9th 10 07:41 AM
Modal or Modeless UserForm? Charlotte E.[_2_] Excel Programming 4 September 27th 08 07:39 PM
Setting Top and Left of Modal UserForm Bart[_6_] Excel Programming 3 July 12th 07 04:17 PM
Setting Top and Left of Modal UserForm Bart[_6_] Excel Programming 0 July 12th 07 03:08 PM
Modal Userform and Preview on Screen Jos Vens[_2_] Excel Programming 9 February 13th 06 09:50 PM


All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"