27-04-13, 07:56 AM
طيب تعديل على كودك :
كود :
Dim A As Integer
If Val(Trim(Text6.Text)) / 2 < 4 Then
Text8.Text = "4"
End If
If Val(Trim(Text6.Text)) / 2 > 4 Then
A = (Val(Trim(Text6.Text)) / 2) Mod 2
IF A > 0 Then
Text8.Text = (Val(Trim(Text6.Text)) / 2) + (2-A)
Else
Text8.Text = Val(Trim(Text6.Text)) / 2
End IF
End If
