min and max in a text box

  • Thread starter Thread starter Gary Keramidas
  • Start date Start date
G

Gary Keramidas

is there a command button on the form that will open either form?
 
I have a textbox in a user form
when an operator enters a number between 1500 and 1700 I want it to
open userform5 if is is above 1700 or below 1500 I want it to open
userform17

Thanks

Stephen
 
this may work for you, i used a command button on userform1

Private Sub CommandButton1_Click()
If Me.TextBox1.Value = "" Then
MsgBox "enter a number"
Exit Sub
End If
If Me.TextBox1.Value > 1500 And Me.TextBox1.Value < 1700 Then
UserForm5.Show
Else
UserForm17.Show
End If
Unload Me
End Sub
 

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