VERSION 5.00 Begin VB.Form frmMain Caption = "Are you Graduating?" ClientHeight = 4530 ClientLeft = 165 ClientTop = 855 ClientWidth = 6510 LinkTopic = "Form1" MaxButton = 0 'False ScaleHeight = 4530 ScaleWidth = 6510 StartUpPosition = 3 'Windows Default Begin VB.CommandButton cmdInstructions Caption = "Instructions" Height = 375 Left = 4560 TabIndex = 13 Top = 3720 Width = 1455 End Begin VB.CommandButton cmdGraduate Caption = "Did You Graduate?" Height = 375 Left = 1800 TabIndex = 6 Top = 2400 Width = 1695 End Begin VB.TextBox txtFees Height = 375 Left = 3720 TabIndex = 5 Top = 1800 Width = 1215 End Begin VB.TextBox txtElectives Height = 375 Left = 2040 TabIndex = 4 Top = 1800 Width = 1215 End Begin VB.TextBox txtCitizenship Height = 375 Left = 360 TabIndex = 3 Top = 1800 Width = 1215 End Begin VB.TextBox txtMath Height = 375 Left = 3720 TabIndex = 2 Top = 840 Width = 1215 End Begin VB.TextBox txtWriting Height = 375 Left = 2040 TabIndex = 1 Top = 840 Width = 1215 End Begin VB.TextBox txtReading Height = 375 Left = 360 TabIndex = 0 Top = 840 Width = 1215 End Begin VB.Label lblGraduate Height = 615 Left = 1440 TabIndex = 14 Top = 3240 Width = 2295 End Begin VB.Label lblFees Caption = "Fees" Height = 255 Left = 3720 TabIndex = 12 Top = 1560 Width = 1215 End Begin VB.Label lblElectives Caption = "Electives" Height = 255 Left = 2040 TabIndex = 11 Top = 1560 Width = 1215 End Begin VB.Label lblCitizenship Caption = "Citizenship" Height = 255 Left = 360 TabIndex = 10 Top = 1560 Width = 1215 End Begin VB.Label lblMath Caption = "Math" Height = 255 Left = 3720 TabIndex = 9 Top = 600 Width = 1215 End Begin VB.Label lblWriting Caption = "Writing" Height = 255 Left = 2040 TabIndex = 8 Top = 600 Width = 1215 End Begin VB.Label lblReading Caption = "Reading" Height = 255 Left = 360 TabIndex = 7 Top = 600 Width = 1215 End Begin VB.Menu mnufile Caption = "&File" Begin VB.Menu mnuexit Caption = "E&xit" End End End Attribute VB_Name = "frmMain" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False 'Programmer Name Tony Bess 'Program Name VB14 'Class Period 1 'Date November 6, 2003 'Description Program to tell if a person has graduating upon meeting requirements Option Explicit Private Sub cmdGraduate_Click() Dim Citizenship As Integer Dim Electives As Integer Dim Fees As Integer Dim Math As Integer Dim Reading As Integer Dim Writing As Integer Citizenship = Val(txtCitizenship.Text) Electives = Val(txtElectives.Text) Fees = Val(txtFees.Text) Math = Val(txtMath.Text) Reading = Val(txtReading.Text) Writing = Val(txtWriting.Text) 'Checks to see if the text boxes add up to 18 or greater. If (Reading + Writing + Math + Citizenship + Electives) >= 18 Then If (Fees) = 0 Then lblGraduate.Caption = "CONGRATS, YOU CAN GRADUATE!" 'Makes sure you have no fees Else If (Fees) > 0 Then lblGraduate.Caption = "SORRY YOU CANNOT GRADUATE!" 'Shows error if fees are greater than 0 Else MsgBox ("Please add a real amount of fees") End If End If End If If (Reading + Writing + Math + Citizenship + Electives) < 18 Then lblGraduate.Caption = "SORRY YOU CANNOT GRADUATE!" End If End Sub Private Sub cmdInstructions_Click() frmInstructions.Show End Sub Private Sub mnuexit_Click() Unload Me End Sub