Use IF Statements in Visual Basic 2005 & 2008

Use IF Statements in Visual Basic 2005 & 2008

In this Visual Basic tutorial, you'll learn to use conditional statements for the push-button validation of a designated text string. The code used in this example is as follows:

Dim Captain As String

Captain = TextBoxCaptain.Text
Captain = Captain.ToUpper

If Captain = "PICARD" Or Captain = "KIRK" Or Captain = "ARCHER" Or Captain = "PIKE" Or Captain = "JANEWAY" Then

MsgBox("Indeed, Warp Factor 9!")
Else
MsgBox(Captain & " has never been a Captain")
End If

For complete, step-by-step instructions on using IF statements in your own Visual Basic 2005 and 2008 Studio projects, watch this how-to.

Hosted by youtube.com
Creator's Site: www.youtube.com/user/Firchild
Curated By: rmansur

Comments

Add your comment:

4 Years in the Making: Insane Papercraft City

Tokyo art student, Wataru Itou, spent four long years crafting his meticulous paper city, entitled "A Castle On the Ocean".  The miniature papercraft city was constructed with ...

Jetman Flys Over Atlantic with DIY Wings - Plummets!

Yves Rossy, AKA Jetman, attempted to fly across the Atantic from Morocco to Spain yesterday. His homemade, jet powered wings "span 8 feet and are powered by four kerosene-fueled jet engines ...

Avoid Turkey-Frying-Fire Disaster this Thanksgiving

Thinking of deep frying a turkey this Thanksgiving? Careful. Or this might happen: Luckily, Alton Brown (of Food Network) offers a thorough step-by-step on how to fry that bird. Hackaday has also ...

Turbo Turkey - Cook the Damn Bird Above the Camshaft

So, I suppose we're going both redneck and Thanksgiving turkey twice today (Redneck Slingshot Chick + Extreme Thanksgiving Recipes). Something about home for the holidays inspires... and this is ...

Deeply Trusting Female Volunteers Bod to Redneck Science: First Human Slingshot

Well, maybe these folks aren't redneck. That is a pretty nice house, and that slingshot doesn't look too jery rigged. But the idea of a human slingshot is certainly redneck (and lotsa fun). Previously ...

loading...