UserForm & listBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need some info on UserForm.
If I call the USERFORM with:
"UserForm.show Modal"
And inside this userform i have a listrBox & CommandButton to validate the
choice from the list box
The program must be stop to wait for the selection & the click on the OK
button from the user?
Could you confirme this assumption.
Thank you very much.

Jean
 
No, they could hit the X in the top-right and close the form down.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
True, but you can capture the click of the close button and ignore it
forcing the user to click the OK button, correct? I could be
misunderstanding the OP's question.
Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then Cancel = True
End Sub
 
JW said:
True, but you can capture the click of the close button and ignore it
forcing the user to click the OK button, correct? I could be
misunderstanding the OP's question.
Private Sub UserForm_QueryClose _
(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then Cancel = True
End Sub
I am sorry I think my question was no very clear .
What I would like know if is true that the userform stop the flow of the
program.
Thank you.

Jean
 
Yes.

If you are using xl2k+, you can show the userform modelessly:

userform1.show false

and you can do other things while the userform is displayed.
 
Yes it does stop the flow of the VBA procedure that called it, but you can
still interact with the spreadsheet, either via code, or by showing the form
modelessly.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Back
Top