Thread: @ symbol
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default @ 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