VB Conditionals If Then, Select Case. If Then Useful computer programs typically have to make a lot of decisions. In VB, If…Then code is used for decision.

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Chapter 4 Decision Making Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E. Reingold.
Slides, Flips, and Turns CLICK HERE TO BEGIN THE GAME!!
AGENT TRAINING PowerPoint Basics. Goals: After today, you will be able to: Add new slides Add new slides Apply design templates Apply design templates.
Selection (decision) control structure Learning objective
Introduction to Flowcharting
Boolean Expressions Conditional Statements & Expressions CSC 1401: Introduction to Programming with Java Lecture 4 – Part 2 Wanda M. Kunkle.
With Microsoft ® Office 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 GO! with Microsoft ® Office 2010 Common Features Using the Common.
USING MICROSOFT EXCEL Making Data Into Charts by Rene F. Pack, MIS.
How to add a Wevideo project to you Jimdo Homepage Frontier EMST.
PowerPoint Exercise: Download this exercise to your computer, then complete the numbered tasks. Fulbright Computer Skills Summer 2012.
Click your mouse to continue. Using the PowerPoint Dialog Box When creating a new presentation, you can begin one of three ways: 1.using PowerPoint’s AutoContent.
Programming Fundamentals. Today’s lecture Decisions If else …… Switch Conditional Operators Logical Operators.
With Microsoft ® Office e© 2013 Pearson Education, Inc. Publishing as Prentice Hall1 Common Features Using the Common Features of Microsoft ® Office.
Data Entry Screen Slides Singles, Pairs, & Dance Season September 2014.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
Web Page Design Introduction. The ________________ is a large collection of pages stored on computers, or ______________ around the world. Hypertext ________.
Microsoft power point Lecture -12- By lec. (Eng.) Hind Basil University of technology Department of Materials Engineering.
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Periodic Signals Triangle Wave Other Simple Functions Review Integration.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Office 2002 Lesson 4 Creating.
Showing the Developer Tab. Windows vs Mac This is one of the places where the Mac and Windows procedures are different. We’ll look at the Windows method.
Chapter 3 Control Structures. The If…Then Statement The If…Then statement is a Decision statement = that executes a set of statements when a condition.
This is an example of an interactive PowerPoint presentation click the button to find out more Enter.
5.04 Apply Decision Making Structures
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 4: Chapter 4: Slide 1 Unit 4 Decisions Chapter 4 Making Decisions and Working.
1 Introduction to Flowcharting Computer Science Principles ASFA.
© 2013 Pearson Education, Inc. Publishing as Prentice Hall1 with Microsoft ® Office for Mac 2011 Common Features Using the Common Features of Microsoft.
VB.NET and Databases. ADO.NET VB.Net allows you many ways to connect to a database. The technology used to interact with a database or data source is.
Using Custom Submission Questions and Questionnaires in Editorial Manager™ Created by J. Strusz (9/21/2010)
Computer Science Up Down Controls, Decisions and Random Numbers.
Instructions You can easily edit the text and images on these Pinterest viral quotes by selecting either the text box or picture and working with that.
Modelling Complex Systems Video 4: A simple example in a complex way.
3.15 Zebra Printer GK420T Installation 1.Only proceed the steps below when Zebra printer is necessary else skip this installation. Go to folder menu as.
MGT 360 Week 2 Individual Shareholders and Stakeholders Presentation To purchase this material click on below link
Add Media in Company After Login Below screen will display
Data Entry Screen Slides Singles, Pairs, & Dance Season September 2016
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Introduction to Flowcharting
CLICK HERE TO BEGIN THE GAME!!
Insert the title of your presentation here
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Overdrive Instructions
And the text with form..
Finding Movies with FRBR & Facets
Data Entry Screen Slides Singles, Pairs, & Dance Season February 2018
Tech Drop In: Google Drive
What do these words mean to you?
Meditation Class 1. Meditation Class 2. Meditation Class 3
ISO 9001: 2008 Documentation Kit
UCAS Progress How to Guide
HOW TO CREATE A CLASS Steps:
Data Entry Screen Slides Singles, Pairs, & Dance Season December 2018
Insert the title of your presentation here
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Instructions You can easily edit the text and images on these Pinterest viral quotes by selecting either the text box or picture and working with that.
How to Prepare for IIT JAM After 12th?. Your Decision to start preparing for IIT JAM Exam after 12th Class is good for your own. Doing this will help.
See requirements for practice program on next slide.
Introduction to PowerPoint
Applying for 6th Forms, Colleges and Apprenticeships in Kent
62 – Sequences and Series Day 1 Calculator Required
HEADLINE GOES HERE. Directions to save header as JPEG:
Introduction to Flowcharting
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
ISO 9001: 2008 Documentation Kit
Data Entry Screen Slides Singles, Pairs, & Dance Season September 2014
Insert the title of your presentation here
Insert the title of your presentation here
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Presentation transcript:

VB Conditionals If Then, Select Case

If Then Useful computer programs typically have to make a lot of decisions. In VB, If…Then code is used for decision making. The code below demonstrates the most commonly used If…Then patterns in VB. The full code for these examples can be found in Conditionals.zip, available in Lecture materials. 2

If Then…Else If Generally, I prefer either Select Case or a series of If Thens to using Else If; however The code below seems to be the best way to determine which radio button is selected:

Select Case 4 When you want to choose among several options based on the value of an expression, you can use Select Case. The full code for these examples can be found in Conditionals.zip, available in Lecture materials.

Select Case Here’s another Select Case example. Note that it uses the colon (“:”) to combine two lines of code into one. This example is demonstrated in the video (see slide 29) 5

Another Select Case Example This example demonstrates several different Case formats that can be used: 6