ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm & listBox (https://www.excelbanter.com/excel-programming/398268-userform-listbox.html)

Jean

UserForm & listBox
 
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


Bob Phillips

UserForm & listBox
 
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)

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




JW[_2_]

UserForm & listBox
 
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

Bob Phillips wrote:
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)

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



Jean

UserForm & listBox
 


"JW" wrote:

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

Bob Phillips wrote:
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)

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



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

Dave Peterson

UserForm & listBox
 
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.

jean wrote:

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


--

Dave Peterson

Bob Phillips

UserForm & listBox
 
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)

"jean" wrote in message
...


"JW" wrote:

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

Bob Phillips wrote:
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)

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



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





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

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