ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   textbox options (https://www.excelbanter.com/excel-programming/296005-textbox-options.html)

choice

textbox options
 
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?

Chris

textbox options
 
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?

choice

textbox options
 
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

Chris

textbox options
 
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



All times are GMT +1. The time now is 07:19 AM.

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