SlideShare a Scribd company logo
Conditional
 Statement
If-then Statement
Syntax
If ConditionToCheck Then Statement



* If the ConditionToCheck is true, then the
program will execute the Statement.
Example

If Text1.Text = 1 Then Print
"hello"
If-then-Else Statement
If ConditionToCheck         Then
Statement1
Else
Statement2
End If

*if the ConditionToCheck is true, then the first
statement, Statement1, is executed. If
the ConditionToCheck is false, the second
statement, in this case Statement2, is executed.
Example
If Text1.Text = 5
Then
Print "hello"
Else
Print "hi"
End If
If-then-ElseIf Statement
If ConditionToCheck Then
Statement1
ElseIf ConditionToCheck Then
Statement2
Else
Statement2
End If
Example
If Text1.Text = 5 Then
Print "hello"
ElseIf Text1.Text = 4 Then
Print "hi“
Else
Print “Goodbye!”
End If

More Related Content

Viewers also liked

Leveraging the Power of Social Media - For Cisco Partners
Leveraging the Power of Social Media - For Cisco PartnersLeveraging the Power of Social Media - For Cisco Partners
Leveraging the Power of Social Media - For Cisco PartnersSquareOne|Consulting
 
Social Media | Demystified
Social Media | DemystifiedSocial Media | Demystified
Social Media | Demystified
SquareOne|Consulting
 
Practice Quiz Week 4
Practice Quiz Week 4Practice Quiz Week 4
Practice Quiz Week 4tjvmetric
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
Mohammed Saleh
 
Theming Sites with SASS
Theming Sites with SASSTheming Sites with SASS
Theming Sites with SASS
Shawn Rider
 
Barbarians at the Gate: Games and Culture
Barbarians at the Gate: Games and CultureBarbarians at the Gate: Games and Culture
Barbarians at the Gate: Games and Culture
Shawn Rider
 
Work is not a Dare: Tips for Building Inclusive Teams
Work is not a Dare: Tips for Building Inclusive TeamsWork is not a Dare: Tips for Building Inclusive Teams
Work is not a Dare: Tips for Building Inclusive Teams
Shawn Rider
 

Viewers also liked (10)

Leveraging the Power of Social Media - For Cisco Partners
Leveraging the Power of Social Media - For Cisco PartnersLeveraging the Power of Social Media - For Cisco Partners
Leveraging the Power of Social Media - For Cisco Partners
 
Itog
ItogItog
Itog
 
Introduction to Visual Basic (Week 2)
Introduction to Visual Basic (Week 2)Introduction to Visual Basic (Week 2)
Introduction to Visual Basic (Week 2)
 
test
testtest
test
 
Social Media | Demystified
Social Media | DemystifiedSocial Media | Demystified
Social Media | Demystified
 
Practice Quiz Week 4
Practice Quiz Week 4Practice Quiz Week 4
Practice Quiz Week 4
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Theming Sites with SASS
Theming Sites with SASSTheming Sites with SASS
Theming Sites with SASS
 
Barbarians at the Gate: Games and Culture
Barbarians at the Gate: Games and CultureBarbarians at the Gate: Games and Culture
Barbarians at the Gate: Games and Culture
 
Work is not a Dare: Tips for Building Inclusive Teams
Work is not a Dare: Tips for Building Inclusive TeamsWork is not a Dare: Tips for Building Inclusive Teams
Work is not a Dare: Tips for Building Inclusive Teams
 

If then statement