Option Explicit
Dim intTotalWeight As Long
Dim intCounter As Integer
Private Sub cmdBox_Click()
'Add weight of car to ttal weight of train
intTotalWeight = intTotalWeight + 65000
'Count total number of cars
intCounter = intCounter + 1
'Display Results
lblNumber.Caption = intCounter
lblWeight.Caption = intTotalWeight
End Sub
Private Sub cmdCaboose_Click()
'Add weight of car to total weight of train
intTotalWeight = intTotalWeight + 48000
'Count total number of cars
intCounter = intCounter + 1
'Display Results
lblNumber.Caption = intCounter
lblWeight.Caption = intTotalWeight
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdHopper_Click()
'Add weight of car to ttal weight of train
intTotalWeight = intTotalWeight + 51300
'Count total number of cars
intCounter = intCounter + 1
'Display Results
lblNumber.Caption = intCounter
lblWeight.Caption = intTotalWeight
End Sub
Private Sub cmdRefrig_Click()
'Add weight of car to ttal weight of train
intTotalWeight = intTotalWeight + 59400
'Count total number of cars
intCounter = intCounter + 1
'Display Results
lblNumber.Caption = intCounter
lblWeight.Caption = intTotalWeight
End Sub
Private Sub cmdTank_Click()
'Add weight of car to ttal weight of train
intTotalWeight = intTotalWeight + 45200
'Count total number of cars
intCounter = intCounter + 1
'Display Results
lblNumber.Caption = intCounter
lblWeight.Caption = intTotalWeight
End Sub