با عرض سلام وخسته نباشد
من این کد رو نوشتم ولی کار نمیکنه
فکر میکنم مشکل از درست نبودن If ها باشه
ممنون میشم بگید مشکل کجاست و رفعش کنید.
من این کد رو نوشتم ولی کار نمیکنه
فکر میکنم مشکل از درست نبودن If ها باشه
ممنون میشم بگید مشکل کجاست و رفعش کنید.
کد PHP:
Private Sub CommandButton5_Click()
Height = (heightTens * 100) + heightUnits
weight1 = (weight * 0.453592)
If OptionButton4.Value = True Then
calories = ((weight1 * 10) + (Height * 6.25) - (age * 5) + 5)
Exit Sub
End If
If OptionButton5.Value = True Then
calories = ((weight1 * 10) + (Height * 6.25) - (age * 5) - 161)
Exit Sub
End If
If OptionButton9.Value = True Then
calories1 = Math.Round(calories * 1.1)
Exit Sub
End If
If OptionButton10.Value = True Then
calories1 = Math.Round(calories * 1.3)
Exit Sub
End If
If OptionButton11.Value = True Then
calories1 = Math.Round(calories * 1.5)
Exit Sub
End If
If OptionButton12.Value = True Then
calories1 = Math.Round(calories * 1.7)
Exit Sub
End If
If OptionButton6.Value = True Then
If (calories1 <= 2000) Then calories2 = 0.9 * calories1
If (calories1 > 2000) Then calories2 = 0.8 * calories1
protons.Caption = Math.Round(0.4 * calories2 / 4)
Exit Sub
End If
If OptionButton7.Value = True Then
If (calories1 <= 2000) Then calories2 = 0.9 * calories1
If (calories1 > 2000) Then calories2 = 0.8 * calories1
protons.Caption = Math.Round(0.4 * calories2 / 4)
Exit Sub
End If
If OptionButton8.Value = True Then
If (calories1 <= 2000) Then calories2 = 0.9 * calories1
If (calories1 > 2000) Then calories2 = 0.8 * calories1
protons.Caption = Math.Round(0.4 * calories2 / 4)
Exit Sub
End If
End Sub
کامنت