ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   @ symbol (https://www.excelbanter.com/excel-programming/284851-%40-symbol.html)

dave

@ symbol
 
i have a VBA form and i need to make sure the user enteres
an @ symbol in a text box

any help will be great

thanks

Tom Ogilvy

@ symbol
 
in the exit event

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
if instr(Textbox1.Text,"@") = 0 then
msgbox "Please enter an @ symbol"
Cancel = True
End if
End Sub

You might want to put a similar check in the code that will drop the
userform.

--
Regards,
Tom Ogilvy


"dave" wrote in message
...
i have a VBA form and i need to make sure the user enteres
an @ symbol in a text box

any help will be great

thanks





All times are GMT +1. The time now is 09:52 PM.

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