Code:
Private Sub ToggleButton1_Click() model1 = Model1box.Text model2 = model2box.Text Weight1 = Weightbox1.Value hp1 = horsepower1.Value et1 = 5.825 * ((Weight1 / hp1) ^ (1 / 3)) Et1box.Value = et1 Weight2 = Weightbox2.Value hp2 = horsepower2.Value et2 = 5.825 * ((Weight2 / hp2) ^ (1 / 3)) ET2box.Value = et2 If (et1 < et2) Then Champion.Text = model1 ElseIf (et1 > et2) Then Champion.Text = model2 Else Champion.Text = "Tie" End If End Sub
Comment