Header Banner
wonderhowto.mark.png
Gadget Hacks Next Reality Food Hacks Null Byte The Secret Yumiverse Invisiverse Macgyverisms Mind Hacks Mad Science Lock Picking Driverless

How to Use IF Statements in Visual Basic 2005 & 2008

Oct 16, 2008 06:00 PM
Code editor displaying a programming code snippet.

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.

The next big software update for iPhone is coming sometime in April and will include a Food section in Apple News+, an easy-to-miss new Ambient Music app, Priority Notifications thanks to Apple Intelligence, and updates to apps like Mail, Photos, Podcasts, and Safari. See what else is coming to your iPhone with the iOS 18.4 update.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!