textbox options

C

Choice

is there a way for a text box to have a yes and no button pop up when wrong information is entered...when you click yes, it takes you to one sheet, if you click no it takes you to another sheet?
 
C

chris

Why not just open the sheets based on the return value of textBo

If TextBox1.text = ValidValue Then
Sheets("Yes").activat
Els
Sheets("No").activat
End I

----- Choice wrote: ----

is there a way for a text box to have a yes and no button pop up when wrong information is entered...when you click yes, it takes you to one sheet, if you click no it takes you to another sheet?
 
C

choice

the only problem is that they dont have to go to the other sheet, so i want the user to have the option to click yes or no
 
C

chris

Use msgbox function then

If TextBox1.text = InValidValue Then
x = Msgbox("Your Message",vbYesNoCancel
If x = vbYes then Sheets("Yes").activat
If x = vbNo then Sheets("No").activate
End if
 
Top