SlideShare a Scribd company logo
“If then Statement” Activity
Do this:
1. Create a form that has 2 labels, 1 button and 1 textbox.
Double click the submit button and place the code below:
Private Sub Button1_Click(ByVal sender As System Object ByVal e As System. EventArgs)
Handles Button1. Click
Dim myAge As Integer
MyAge = Textbox1.Text
If myAge >= 60 Then
Label2. Text = “You have a discount. You are a Senior Citizen”
End If
End Sub
2. Press F5 or go to Debug > Start Debugging to run the program.
3. When Saving:
Filename: “DetermineAge” > Section’s Folder(4th Quarter files)
If Then Else Statement Activity
Do this:
1. Create a form that has 3 labels, 1 button and 1 textbox.
2. Double click the submit button and place the code below:
Private Sub Button1_Click(ByVal sender As System Object ByVal e As System.
EventArgs) Handles
Dim myMark As Integer
myMark = TextBox1.Text
If myMark > 75 Then
Label3.Text = “A’’
Else
Label3. Text = “B”
End If
End Sub
4. Press F5 or go to Debug > Start Debugging to run the program.
5. When Saving:
Filename: “MarkEvaluation” > Section’s Folder(4th Quarter files)
If Then Elself Statement Activity
Do this:
1. Create a form that has 3 labels, 1 submit button and 1 textbox.
2. Double click the submit button and place the code below:
Private Sub Button1_Click(ByVal sender As System Object ByVal e As System.
EventArgs) Handles
Dim myMark As Single
myMark = Textbox1. Text
Select myMark
Case 0 to 49
Label3. Text = “Need to work harder”
Case 50 to 59
Label3. Text = “Average”
Case 60 to 69
Label 3. Text = “Above Average”
Case 70 to 84
Label3. Text = “Good”
Case Else
Label 3. Text = “Excellence”
End Select
3. Press F5 or go to Debug > Start Debugging to run the program.
4. When Saving:
Filename: “MarkEvaluation2” > Section’s Folder(4th Quarter files)

More Related Content

DOCX
Código Acerca Editor_Net
PPTX
Multiply-and-divide-in-excel
PPTX
Googlepowerpoint
DOCX
Oodp extra2
PPTX
PDF
Meta analysis in rev man screen captures-1
PDF
Guevara rene if then., else
PDF
Federico landinez docx
Código Acerca Editor_Net
Multiply-and-divide-in-excel
Googlepowerpoint
Oodp extra2
Meta analysis in rev man screen captures-1
Guevara rene if then., else
Federico landinez docx

What's hot (11)

DOCX
Federico landinez docx
DOCX
Christian rodriguez then else
PPTX
React state
DOCX
Hibernat command to windows 10 start menu
PDF
Noguera jesus
PDF
Android Lesson 3 - Intent
PDF
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOC
Comp 122 lab 6 lab report and source code
PPTX
B2. activity and intent
DOCX
Ejercicio de Visual Basic IF THEN ELSE
DOCX
Android menus in android-chapter15
Federico landinez docx
Christian rodriguez then else
React state
Hibernat command to windows 10 start menu
Noguera jesus
Android Lesson 3 - Intent
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
Comp 122 lab 6 lab report and source code
B2. activity and intent
Ejercicio de Visual Basic IF THEN ELSE
Android menus in android-chapter15
Ad

Similar to If then statement activity (20)

PPTX
Lesson 6 Introduction to Human Computer Interaction.pptx
DOCX
1. Determine the output displayed when the button is clicked. Priv.docx
DOCX
1. Determine the output displayed when the button is clicked.Priva.docx
DOCX
Docimp
PPT
ملخص البرمجة المرئية - الوحدة الرابعة
PPTX
IF Then vb2010
PPTX
Working with comparison operators
DOCX
Vbreport program
DOCX
Vbreport
PPTX
Fundamentals of Programming in Visual basic
PPTX
Using decision statements
PPTX
Sharbani bhattacharya VB Structures
PPTX
Conditional statements
PDF
Lab1
PDF
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank
DOCX
Extra Credit Projects Microsoft Office Applications Sof.docx
DOCX
Graphics User Interface Lab Manual
PDF
Automated Assessment And Marking Of Spreadsheet Concepts
PPT
AVB201.2 Microsoft Access VBA Module 2
PPTX
Decision statements in vb.net
Lesson 6 Introduction to Human Computer Interaction.pptx
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked.Priva.docx
Docimp
ملخص البرمجة المرئية - الوحدة الرابعة
IF Then vb2010
Working with comparison operators
Vbreport program
Vbreport
Fundamentals of Programming in Visual basic
Using decision statements
Sharbani bhattacharya VB Structures
Conditional statements
Lab1
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank
Extra Credit Projects Microsoft Office Applications Sof.docx
Graphics User Interface Lab Manual
Automated Assessment And Marking Of Spreadsheet Concepts
AVB201.2 Microsoft Access VBA Module 2
Decision statements in vb.net
Ad

More from majoydrew (20)

PPT
Roleoflocalgovernment 110826092012-phpapp02
PPTX
Mga pananaw sa proseso ng pagbasa
PPTX
PPTX
Teksto Deskriptibo
PPTX
Functional areas
PPTX
Dont stereotype-campaign-movement
PPTX
Applied research 1)practical research)
PPTX
Mga batayang kasanayan sa pagbasa at pagsusuri ng mga Uri ng teksto
PPTX
Bonds )MATH business
PPTX
Science report.
PPTX
Science. Panahon news patrol
PPT
Plants: Structure and Function
PPTX
One to-one function (MATH 11)
PPTX
Methods of reproduction in some animals (science)
PPTX
Leading (MARKETING 11)
PPT
How plants survive grade 11
PPTX
HEALTH OPTIMIZING (P.E) Grade 11 H.O.P.E
PPT
Debating dos and donts
PPTX
Controlling(MARKETING 11)
PPTX
Mga uri o anyo ng tala "filipino 11"
Roleoflocalgovernment 110826092012-phpapp02
Mga pananaw sa proseso ng pagbasa
Teksto Deskriptibo
Functional areas
Dont stereotype-campaign-movement
Applied research 1)practical research)
Mga batayang kasanayan sa pagbasa at pagsusuri ng mga Uri ng teksto
Bonds )MATH business
Science report.
Science. Panahon news patrol
Plants: Structure and Function
One to-one function (MATH 11)
Methods of reproduction in some animals (science)
Leading (MARKETING 11)
How plants survive grade 11
HEALTH OPTIMIZING (P.E) Grade 11 H.O.P.E
Debating dos and donts
Controlling(MARKETING 11)
Mga uri o anyo ng tala "filipino 11"

Recently uploaded (20)

PPTX
Lesson notes of climatology university.
PDF
VCE English Exam - Section C Student Revision Booklet
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Cell Types and Its function , kingdom of life
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Classroom Observation Tools for Teachers
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Structure & Organelles in detailed.
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
Lesson notes of climatology university.
VCE English Exam - Section C Student Revision Booklet
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Complications of Minimal Access Surgery at WLH
A systematic review of self-coping strategies used by university students to ...
O7-L3 Supply Chain Operations - ICLT Program
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Cell Types and Its function , kingdom of life
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Anesthesia in Laparoscopic Surgery in India
Classroom Observation Tools for Teachers
Supply Chain Operations Speaking Notes -ICLT Program
STATICS OF THE RIGID BODIES Hibbelers.pdf
Orientation - ARALprogram of Deped to the Parents.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Structure & Organelles in detailed.
Module 4: Burden of Disease Tutorial Slides S2 2025

If then statement activity

  • 1. “If then Statement” Activity Do this: 1. Create a form that has 2 labels, 1 button and 1 textbox. Double click the submit button and place the code below: Private Sub Button1_Click(ByVal sender As System Object ByVal e As System. EventArgs) Handles Button1. Click Dim myAge As Integer MyAge = Textbox1.Text If myAge >= 60 Then Label2. Text = “You have a discount. You are a Senior Citizen” End If End Sub 2. Press F5 or go to Debug > Start Debugging to run the program. 3. When Saving: Filename: “DetermineAge” > Section’s Folder(4th Quarter files) If Then Else Statement Activity Do this: 1. Create a form that has 3 labels, 1 button and 1 textbox. 2. Double click the submit button and place the code below: Private Sub Button1_Click(ByVal sender As System Object ByVal e As System. EventArgs) Handles Dim myMark As Integer myMark = TextBox1.Text If myMark > 75 Then Label3.Text = “A’’ Else Label3. Text = “B” End If End Sub
  • 2. 4. Press F5 or go to Debug > Start Debugging to run the program. 5. When Saving: Filename: “MarkEvaluation” > Section’s Folder(4th Quarter files) If Then Elself Statement Activity Do this: 1. Create a form that has 3 labels, 1 submit button and 1 textbox. 2. Double click the submit button and place the code below: Private Sub Button1_Click(ByVal sender As System Object ByVal e As System. EventArgs) Handles Dim myMark As Single myMark = Textbox1. Text Select myMark Case 0 to 49 Label3. Text = “Need to work harder” Case 50 to 59 Label3. Text = “Average” Case 60 to 69 Label 3. Text = “Above Average” Case 70 to 84 Label3. Text = “Good” Case Else Label 3. Text = “Excellence” End Select 3. Press F5 or go to Debug > Start Debugging to run the program. 4. When Saving: Filename: “MarkEvaluation2” > Section’s Folder(4th Quarter files)