Quick Visual Basic Question

Associate
Joined
14 Jun 2010
Posts
737
Evening all :)

I have started learning VB today and am in need of a little help.

I am creating a program and I want it to recognise when the user enters @hotmail.com or some other ending for an email address.

As I'm fairly new to the language I was thinking about having a wildcard symbol before the @hotmail. Such as If textbox1.text = "*@hotmail.com" Then

But it appears there is no such function. Can someone please recommend a way for me to do this? Google really hasn't helped much :(

Cheers.
 
It's throwing the error of "Conversion from string "@gmail.com" to type 'Long' is not valid."

the line of code is If TextBox6.Text.EndsWith("@gmail.com" Or "@gmail.co.uk") Then

Any ideas why this is happening? I haven't mentioned Long data types in any of the code. :(
 
Back
Top Bottom