SlideShare una empresa de Scribd logo
1 de 2
“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)

Más contenido relacionado

La actualidad más candente

Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
Christian rodriguez then else
Christian rodriguez then   elseChristian rodriguez then   else
Christian rodriguez then elsegabo2200
 
React state
React  stateReact  state
React stateDucat
 
Hibernat command to windows 10 start menu
Hibernat command to windows 10 start menuHibernat command to windows 10 start menu
Hibernat command to windows 10 start menuBinna Krassniqi
 
Noguera jesus
Noguera jesusNoguera jesus
Noguera jesusgabo2200
 
Android Lesson 3 - Intent
Android Lesson 3 - IntentAndroid Lesson 3 - Intent
Android Lesson 3 - IntentDaniela Da Cruz
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY GOKUL SREE
 
Comp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codeComp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codepradesigali1
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intentPERKYTORIALS
 
Ejercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSEEjercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSERicardoGuti50
 

La actualidad más candente (11)

Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
Christian rodriguez then else
Christian rodriguez then   elseChristian rodriguez then   else
Christian rodriguez then else
 
React state
React  stateReact  state
React state
 
Hibernat command to windows 10 start menu
Hibernat command to windows 10 start menuHibernat command to windows 10 start menu
Hibernat command to windows 10 start menu
 
Noguera jesus
Noguera jesusNoguera jesus
Noguera jesus
 
Android Lesson 3 - Intent
Android Lesson 3 - IntentAndroid Lesson 3 - Intent
Android Lesson 3 - Intent
 
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY DOT NET LAB PROGRAM PERIYAR UNIVERSITY
DOT NET LAB PROGRAM PERIYAR UNIVERSITY
 
Comp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codeComp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source code
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intent
 
Ejercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSEEjercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSE
 
Android menus in android-chapter15
Android menus in android-chapter15Android menus in android-chapter15
Android menus in android-chapter15
 

Similar a If then statement activity

PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMSaraswathiRamalingam
 
Creating a quiz using visual basic 6
Creating a quiz using visual basic 6Creating a quiz using visual basic 6
Creating a quiz using visual basic 6Ella Marie Wico
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
Parra maxi IF THEN ELSE
Parra maxi IF THEN ELSEParra maxi IF THEN ELSE
Parra maxi IF THEN ELSEgabo2200
 
Marquee07 Presentation Windows Xps2
Marquee07 Presentation Windows Xps2Marquee07 Presentation Windows Xps2
Marquee07 Presentation Windows Xps2Sherri Jackson
 
E1 cyc elective advanced e mail
E1 cyc elective advanced e mailE1 cyc elective advanced e mail
E1 cyc elective advanced e mailRozell Sneede
 
Input and output flow using file and logger component
Input and output flow using file and logger component Input and output flow using file and logger component
Input and output flow using file and logger component Son Nguyen
 
Encryption Laboratory   Purpose of the Lab   T.docx
Encryption Laboratory   Purpose of the Lab   T.docxEncryption Laboratory   Purpose of the Lab   T.docx
Encryption Laboratory   Purpose of the Lab   T.docxYASHU40
 
SecondKey (SK) Tutorial User Manual
SecondKey (SK) Tutorial User ManualSecondKey (SK) Tutorial User Manual
SecondKey (SK) Tutorial User Manualiam JayChong
 

Similar a If then statement activity (20)

PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
 
Creating a quiz using visual basic 6
Creating a quiz using visual basic 6Creating a quiz using visual basic 6
Creating a quiz using visual basic 6
 
Hpalm
HpalmHpalm
Hpalm
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
Parra maxi IF THEN ELSE
Parra maxi IF THEN ELSEParra maxi IF THEN ELSE
Parra maxi IF THEN ELSE
 
Marquee07 Presentation Windows Xps2
Marquee07 Presentation Windows Xps2Marquee07 Presentation Windows Xps2
Marquee07 Presentation Windows Xps2
 
Visualbasic tutorial
Visualbasic tutorialVisualbasic tutorial
Visualbasic tutorial
 
Database connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwariDatabase connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwari
 
Correction s+ rie_vb
Correction s+ rie_vbCorrection s+ rie_vb
Correction s+ rie_vb
 
E1 cyc elective advanced e mail
E1 cyc elective advanced e mailE1 cyc elective advanced e mail
E1 cyc elective advanced e mail
 
E1 cyc elective advanced e mail
E1 cyc elective advanced e mailE1 cyc elective advanced e mail
E1 cyc elective advanced e mail
 
Input and output flow using file and logger component
Input and output flow using file and logger component Input and output flow using file and logger component
Input and output flow using file and logger component
 
Encryption Laboratory   Purpose of the Lab   T.docx
Encryption Laboratory   Purpose of the Lab   T.docxEncryption Laboratory   Purpose of the Lab   T.docx
Encryption Laboratory   Purpose of the Lab   T.docx
 
Excel300
Excel300Excel300
Excel300
 
Handling Netcore
Handling  NetcoreHandling  Netcore
Handling Netcore
 
Introduction
IntroductionIntroduction
Introduction
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
SecondKey (SK) Tutorial User Manual
SecondKey (SK) Tutorial User ManualSecondKey (SK) Tutorial User Manual
SecondKey (SK) Tutorial User Manual
 
Remark office OMR
Remark office OMRRemark office OMR
Remark office OMR
 
Login methodology for Primavera V8.3 (EPPM)
Login methodology for Primavera V8.3 (EPPM)Login methodology for Primavera V8.3 (EPPM)
Login methodology for Primavera V8.3 (EPPM)
 

Más de majoydrew

Roleoflocalgovernment 110826092012-phpapp02
Roleoflocalgovernment 110826092012-phpapp02Roleoflocalgovernment 110826092012-phpapp02
Roleoflocalgovernment 110826092012-phpapp02majoydrew
 
Mga pananaw sa proseso ng pagbasa
Mga pananaw sa proseso ng pagbasaMga pananaw sa proseso ng pagbasa
Mga pananaw sa proseso ng pagbasamajoydrew
 
Teksto Deskriptibo
Teksto DeskriptiboTeksto Deskriptibo
Teksto Deskriptibomajoydrew
 
Functional areas
Functional areasFunctional areas
Functional areasmajoydrew
 
Dont stereotype-campaign-movement
Dont stereotype-campaign-movementDont stereotype-campaign-movement
Dont stereotype-campaign-movementmajoydrew
 
Applied research 1)practical research)
Applied research 1)practical research)Applied research 1)practical research)
Applied research 1)practical research)majoydrew
 
Mga batayang kasanayan sa pagbasa at pagsusuri ng mga Uri ng teksto
Mga batayang kasanayan sa pagbasa at pagsusuri ng mga Uri ng tekstoMga batayang kasanayan sa pagbasa at pagsusuri ng mga Uri ng teksto
Mga batayang kasanayan sa pagbasa at pagsusuri ng mga Uri ng tekstomajoydrew
 
Bonds )MATH business
Bonds )MATH businessBonds )MATH business
Bonds )MATH businessmajoydrew
 
Science report.
Science report. Science report.
Science report. majoydrew
 
Science. Panahon news patrol
Science. Panahon news patrolScience. Panahon news patrol
Science. Panahon news patrolmajoydrew
 
Plants: Structure and Function
Plants: Structure and FunctionPlants: Structure and Function
Plants: Structure and Functionmajoydrew
 
One to-one function (MATH 11)
One to-one function (MATH 11)One to-one function (MATH 11)
One to-one function (MATH 11)majoydrew
 
Methods of reproduction in some animals (science)
Methods of reproduction in some animals (science)Methods of reproduction in some animals (science)
Methods of reproduction in some animals (science)majoydrew
 
Leading (MARKETING 11)
Leading (MARKETING 11)Leading (MARKETING 11)
Leading (MARKETING 11)majoydrew
 
How plants survive grade 11
How plants survive grade 11How plants survive grade 11
How plants survive grade 11majoydrew
 
HEALTH OPTIMIZING (P.E) Grade 11 H.O.P.E
HEALTH OPTIMIZING (P.E) Grade 11 H.O.P.EHEALTH OPTIMIZING (P.E) Grade 11 H.O.P.E
HEALTH OPTIMIZING (P.E) Grade 11 H.O.P.Emajoydrew
 
Debating dos and donts
Debating dos and dontsDebating dos and donts
Debating dos and dontsmajoydrew
 
Controlling(MARKETING 11)
Controlling(MARKETING 11)Controlling(MARKETING 11)
Controlling(MARKETING 11)majoydrew
 
Mga uri o anyo ng tala "filipino 11"
Mga uri o anyo ng tala "filipino 11"Mga uri o anyo ng tala "filipino 11"
Mga uri o anyo ng tala "filipino 11"majoydrew
 

Más de majoydrew (20)

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

Último

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Último (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

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)