ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   show userform when response = yes (https://www.excelbanter.com/excel-programming/373075-show-userform-when-response-%3D-yes.html)

musa.biralo

show userform when response = yes
 
Hi,
i have userform in a module and the userform contains textbox and
commmand box.

If (Not IsNumeric(TextBox1.Value)) Then
response = MsgBox("Please provide acceptable Number", vbOKCancel,
"Wrong value!!!")
If response = vbOK Then
' Load UserForm1
Else
End
End If
End If

Problem:
i want to display the userform1 until numeric value. (kind of pause the
program). Load userform1 or userform1.show are not working for some
reason....

Please help.

musa.biralo


Tom Ogilvy

show userform when response = yes
 
Where is this code.

I would suggest you don't hide or unload the userform until you are
satisfied with the entries.

Private Sub CmdOK_Click()
If (Not IsNumeric(TextBox1.Value)) Then
response = MsgBox("Please provide acceptable Number", vbOK + vbCritical,
_
"Wrong value!!!")
Exit sub
End If
Unload me
End Sub


--
Regards,
Tom Ogilvy


"musa.biralo" wrote in message
ups.com...
Hi,
i have userform in a module and the userform contains textbox and
commmand box.

If (Not IsNumeric(TextBox1.Value)) Then
response = MsgBox("Please provide acceptable Number", vbOKCancel,
"Wrong value!!!")
If response = vbOK Then
' Load UserForm1
Else
End
End If
End If

Problem:
i want to display the userform1 until numeric value. (kind of pause the
program). Load userform1 or userform1.show are not working for some
reason....

Please help.

musa.biralo




musa.biralo

show userform when response = yes
 
Thank you Tom
i forgot to put exit sub....then show edit show and hide userform.
Now its ok.

musa.biralo

Tom Ogilvy wrote:
Where is this code.

I would suggest you don't hide or unload the userform until you are
satisfied with the entries.

Private Sub CmdOK_Click()
If (Not IsNumeric(TextBox1.Value)) Then
response = MsgBox("Please provide acceptable Number", vbOK + vbCritical,
_
"Wrong value!!!")
Exit sub
End If
Unload me
End Sub


--
Regards,
Tom Ogilvy


"musa.biralo" wrote in message
ups.com...
Hi,
i have userform in a module and the userform contains textbox and
commmand box.

If (Not IsNumeric(TextBox1.Value)) Then
response = MsgBox("Please provide acceptable Number", vbOKCancel,
"Wrong value!!!")
If response = vbOK Then
' Load UserForm1
Else
End
End If
End If

Problem:
i want to display the userform1 until numeric value. (kind of pause the
program). Load userform1 or userform1.show are not working for some
reason....

Please help.

musa.biralo




All times are GMT +1. The time now is 05:13 PM.

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