Hej.
Jeg har lavet denne lille formel
Private Sub Command1_Click()
If Val(Arenateam2v2.Text) <= 1500 Then
arenapoints2v2 = (Val(Arenateam2v2.Text) * 0.22 + 14) / 100 * 76
End If
If Val(Arenateam3v3.Text) <= 1500 Then
arenapoints3v3 = (Val(Arenateam3v3.Text) * 0.22 + 14) / 100 * 88
End If
If Val(Arenateam5v5.Text) <= 1500 Then
arenapoints5v5 = (Val(Arenateam5v5.Text) * 0.22 + 14)
End If
If Val(Arenateam2v2.Text) > 1500 Then
arenapoints2v2 = 1511.26 / (1 + 1639.28 * 2.71828 ^ (-0.00412 * Val(Arenateam2v2.Text))) / 100 * 76
Text1.Text = arenapoints2v2
End If
If Val(Arenateam3v3.Text) > 1500 Then
arenapoints3v3 = 1511.26 / (1 + 1639.28 * 2.71828 ^ (-0.00412 * Val(Arenateam3v3.Text))) / 100 * 88
Text1.Text = arenapoints3v3
End If
If Val(Arenateam5v5.Text) > 1500 Then
arenapoints5v5 = 1511.26 / (1 + 1639.28 * 2.71828 ^ (-0.00412 * Val(Arenateam5v5.Text)))
Text1.Text = arenapoints5v5
End If
Text1.Text = arenapoints2v2
Text3.Text = arenapoints3v3
Text4.Text = arenapoints5v5
If Text1.Text > Text3.Text And Text1.Text > Text4.Text Then
MsgBox ("You will get " & arenapoints2v2 & " arenapoints")
End If
If Text3.Text > Text1.Text And Text3.Text > Text4.Text Then
MsgBox ("You will get " & arenapoints3v3 & " arenapoints")
End If
If Text4.Text > Text1.Text And Text4.Text > Text3.Text Then
MsgBox ("You will get " & arenapoints3v3 & " arenapoints")
End If
End Sub
men af en eller anden grund kommer der hele tiden en msgbox med det midterste i (altså "You will get " & arenapoints3v3 & " arenapoints") hvilket jo ikke er meningen
Nogen der kan se hvad fejlen er?
tak på forhånd