show userform when response = yes

  • Thread starter Thread starter musa.biralo
  • Start date Start date
M

musa.biralo

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
 
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
 
Thank you Tom
i forgot to put exit sub....then show edit show and hide userform.
Now its ok.

musa.biralo
 

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