SlideShare a Scribd company logo
1 of 17
Decision making
1
Shyam N. Chawda +91 78 74 39 11 91
It’s decide the flow of program
2 types
• Branching statements, Test Structure, Decision
Structure
• Loop statements
2
Shyam N. Chawda 9374928879
Branching Statements
• If, Select case
Loop Statements
• For,Do,While
3
Shyam N. Chawda 9374928879
If condition Then
Logic…
End if
If condition Then
Logic…
Else
Logic….
End if
If condition Then
Logic…
ElseIf condition-n Then
Logic..
Else
Logic…
End If
4
Shyam N. Chawda 9374928879
If TotalMarks>150 then
Logic..
End if
If a=b then
Logic..
Else
Logic..
End if
If Marks>0 and Marks<50 then
Logic..
Else if Marks>=50 and Marks<100
then
Logic..
Else if Marks>=100 and Marks<150
then
Logic..
End if
5
Shyam N. Chawda 9374928879
When it finds a True condition
Else statement block, which Visual
Basic.net executes if none of the conditions
are True.
You can have any number of ElseIf
6
Shyam N. Chawda 9374928879
 You can use And / Or condition with it.
 Example:
If marks>50 and marks<100 then
statements
Else if marks>=100 and marks<150 then
statements
End if
7
Shyam N. Chawda 9374928879
Leap Year
Odd,Even
Positive ,Negative
Maximum,Minimum number
Mark of students
• Between 0 - 50,50 –100 ,100-150
8
Shyam N. Chawda 9374928879
Whereas the If and ElseIf statements
can evaluate a different expression in
each statement,
The Select statement evaluates a
single expression only once and uses
it for every comparison.
9
Shyam N. Chawda 9374928879
Select Case testexpression
[Case expressionlist-n
[statements-n]] ...
[Case Else
[elsestatements]]
End Select
10
Shyam N. Chawda 9374928879
Select Performance
Case 1 ' Performance is 1.
Return Salary * 0.1
Case 2, 3 ' Performance is 2 or 3.
Return Salary * 0.09
Case 5 To 7 ' Performance is 5, 6, or 7.
Return Salary * 0.07
11
Shyam N. Chawda 9374928879
Case 4, 8 To 10 ‘Performance is 4, 8, 9, or 10.
Return Salary * 0.05
Case Is < 14 'Performance is 11, 12, 13.
Return 100
Case Else ' Performance is < 1 or > 14.
Return 0
End select
12
Shyam N. Chawda 9374928879
Select Case JobPlace
Case “Ahmedabad”
logic…
Case “Mumbai”,”Delhi”,”Chennai”
logic..
Case Else
logic..
End select 13
Shyam N. Chawda 9374928879
If multiple Case statements are True,
only the statements belonging to the
first true Case statement are
executed.
Case Else clause must be the last
Case clause.
14
Shyam N. Chawda 9374928879
Use the To keyword to specify a
range of values.
The Is keyword is used to precede
any comparison operators.
15
Shyam N. Chawda 9374928879
Enter Color name and according
to it textbox color will change
Enter student no according to no
display message “Good”,”Try best
in next exam”,”Need to improve”
16
Shyam N. Chawda 9374928879
Any questions?
www.shyamsir.com
Shyam N. Chawda 9374928879 17

More Related Content

What's hot (20)

Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating Systems
 
The Loops
The LoopsThe Loops
The Loops
 
Data types
Data typesData types
Data types
 
History of OS
History of OSHistory of OS
History of OS
 
Modular programming
Modular programmingModular programming
Modular programming
 
Finite automata
Finite automataFinite automata
Finite automata
 
Assembly language (coal)
Assembly language (coal)Assembly language (coal)
Assembly language (coal)
 
Algorithm Design & Implementation
Algorithm Design & ImplementationAlgorithm Design & Implementation
Algorithm Design & Implementation
 
Machine language
Machine languageMachine language
Machine language
 
Types of c operators ppt
Types of c operators pptTypes of c operators ppt
Types of c operators ppt
 
Control structure
Control structureControl structure
Control structure
 
C programming decision making
C programming decision makingC programming decision making
C programming decision making
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
 
Subroutines
SubroutinesSubroutines
Subroutines
 
Keyboard shortcuts
Keyboard shortcutsKeyboard shortcuts
Keyboard shortcuts
 
Excel assignment
Excel assignmentExcel assignment
Excel assignment
 
Elements of programming
Elements of programmingElements of programming
Elements of programming
 
Input output statement in C
Input output statement in CInput output statement in C
Input output statement in C
 
Basic shortcut keys of computer or PC
Basic shortcut keys of computer or PCBasic shortcut keys of computer or PC
Basic shortcut keys of computer or PC
 
10 instruction sets characteristics
10 instruction sets characteristics10 instruction sets characteristics
10 instruction sets characteristics
 

Viewers also liked

Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETShyam Sir
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3a_akhavan
 
Part2 database connection service based using vb.net
Part2 database connection service based using vb.netPart2 database connection service based using vb.net
Part2 database connection service based using vb.netGirija Muscut
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prologPreston Lee
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.netGirija Muscut
 
Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Larry Nung
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information scienceS. Kate Devitt
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uNikola Plejic
 
Part 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valuePart 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valueGirija Muscut
 
How Not To Be Seen
How Not To Be SeenHow Not To Be Seen
How Not To Be SeenMark Pesce
 
What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++Microsoft
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15Niit Care
 
Part 1 picturebox using vb.net
Part 1 picturebox using vb.netPart 1 picturebox using vb.net
Part 1 picturebox using vb.netGirija Muscut
 
Making Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignMaking Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignHubbard One
 
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsWolfgang Stock
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technologyGlenn Klith Andersen
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netGirija Muscut
 

Viewers also liked (20)

Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NET
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3
 
Part2 database connection service based using vb.net
Part2 database connection service based using vb.netPart2 database connection service based using vb.net
Part2 database connection service based using vb.net
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prolog
 
Presentation1
Presentation1Presentation1
Presentation1
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.net
 
Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Debugging in visual studio (basic level)
Debugging in visual studio (basic level)
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information science
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
 
Part 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valuePart 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative value
 
How Not To Be Seen
How Not To Be SeenHow Not To Be Seen
How Not To Be Seen
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15
 
Part 1 picturebox using vb.net
Part 1 picturebox using vb.netPart 1 picturebox using vb.net
Part 1 picturebox using vb.net
 
Making Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignMaking Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information Design
 
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technology
 
Information Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław MuraszkiewiczInformation Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław Muraszkiewicz
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.net
 

More from Shyam Sir

Mobile Application
Mobile ApplicationMobile Application
Mobile ApplicationShyam Sir
 
State Management in ASP.NET
State Management in ASP.NETState Management in ASP.NET
State Management in ASP.NETShyam Sir
 
MVC First Basic
MVC First BasicMVC First Basic
MVC First BasicShyam Sir
 
Basic Concept of ASP.NET
Basic Concept of ASP.NETBasic Concept of ASP.NET
Basic Concept of ASP.NETShyam Sir
 
ASP.NET with VB.NET
 ASP.NET with VB.NET ASP.NET with VB.NET
ASP.NET with VB.NETShyam Sir
 
Master page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETMaster page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETShyam Sir
 

More from Shyam Sir (8)

Mobile Application
Mobile ApplicationMobile Application
Mobile Application
 
Hosting
HostingHosting
Hosting
 
It new2015
It new2015It new2015
It new2015
 
State Management in ASP.NET
State Management in ASP.NETState Management in ASP.NET
State Management in ASP.NET
 
MVC First Basic
MVC First BasicMVC First Basic
MVC First Basic
 
Basic Concept of ASP.NET
Basic Concept of ASP.NETBasic Concept of ASP.NET
Basic Concept of ASP.NET
 
ASP.NET with VB.NET
 ASP.NET with VB.NET ASP.NET with VB.NET
ASP.NET with VB.NET
 
Master page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETMaster page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NET
 

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

If Else .. Select Case in VB.NET

  • 1. Decision making 1 Shyam N. Chawda +91 78 74 39 11 91
  • 2. It’s decide the flow of program 2 types • Branching statements, Test Structure, Decision Structure • Loop statements 2 Shyam N. Chawda 9374928879
  • 3. Branching Statements • If, Select case Loop Statements • For,Do,While 3 Shyam N. Chawda 9374928879
  • 4. If condition Then Logic… End if If condition Then Logic… Else Logic…. End if If condition Then Logic… ElseIf condition-n Then Logic.. Else Logic… End If 4 Shyam N. Chawda 9374928879
  • 5. If TotalMarks>150 then Logic.. End if If a=b then Logic.. Else Logic.. End if If Marks>0 and Marks<50 then Logic.. Else if Marks>=50 and Marks<100 then Logic.. Else if Marks>=100 and Marks<150 then Logic.. End if 5 Shyam N. Chawda 9374928879
  • 6. When it finds a True condition Else statement block, which Visual Basic.net executes if none of the conditions are True. You can have any number of ElseIf 6 Shyam N. Chawda 9374928879
  • 7.  You can use And / Or condition with it.  Example: If marks>50 and marks<100 then statements Else if marks>=100 and marks<150 then statements End if 7 Shyam N. Chawda 9374928879
  • 8. Leap Year Odd,Even Positive ,Negative Maximum,Minimum number Mark of students • Between 0 - 50,50 –100 ,100-150 8 Shyam N. Chawda 9374928879
  • 9. Whereas the If and ElseIf statements can evaluate a different expression in each statement, The Select statement evaluates a single expression only once and uses it for every comparison. 9 Shyam N. Chawda 9374928879
  • 10. Select Case testexpression [Case expressionlist-n [statements-n]] ... [Case Else [elsestatements]] End Select 10 Shyam N. Chawda 9374928879
  • 11. Select Performance Case 1 ' Performance is 1. Return Salary * 0.1 Case 2, 3 ' Performance is 2 or 3. Return Salary * 0.09 Case 5 To 7 ' Performance is 5, 6, or 7. Return Salary * 0.07 11 Shyam N. Chawda 9374928879
  • 12. Case 4, 8 To 10 ‘Performance is 4, 8, 9, or 10. Return Salary * 0.05 Case Is < 14 'Performance is 11, 12, 13. Return 100 Case Else ' Performance is < 1 or > 14. Return 0 End select 12 Shyam N. Chawda 9374928879
  • 13. Select Case JobPlace Case “Ahmedabad” logic… Case “Mumbai”,”Delhi”,”Chennai” logic.. Case Else logic.. End select 13 Shyam N. Chawda 9374928879
  • 14. If multiple Case statements are True, only the statements belonging to the first true Case statement are executed. Case Else clause must be the last Case clause. 14 Shyam N. Chawda 9374928879
  • 15. Use the To keyword to specify a range of values. The Is keyword is used to precede any comparison operators. 15 Shyam N. Chawda 9374928879
  • 16. Enter Color name and according to it textbox color will change Enter student no according to no display message “Good”,”Try best in next exam”,”Need to improve” 16 Shyam N. Chawda 9374928879