1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
Private Sub UserForm_Initialize()
Dim tol1, tol2 As Single
tol1 = 95
tol2 = 120
txt1.Value = tol1
txt2.Value = tol2
labYes.Visible = False
LabNo.Visible = False
labYes2.Visible = False
labNo2.Visible = False
End Sub
Private Sub txt3_AfterUpdate()
If txt3.Value = "" Then
labYes.Visible = False
LabNo.Visible = False
Exit Sub
End If
Dim tol1 As Single
Dim val1 As Single
tol1 = UserForm1.txt1.Value
val1 = UserForm1.txt3.Value
If val1 < tol1 Then
LabNo.Visible = True
labYes.Visible = False
ElseIf val1 >= tol1 Then
labYes.Visible = True
LabNo.Visible = False
End If
End Sub
Private Sub txt4_AfterUpdate()
If txt4.Value = "" Then
labYes2.Visible = False
labNo2.Visible = False
Exit Sub
End If
Dim tol2 As Single
Dim val2 As Single
tol2 = UserForm1.txt2.Value
val2 = UserForm1.txt4.Value
If val2 < tol2 Then
labNo2.Visible = True
labYes2.Visible = False
ElseIf val2 >= tol2 Then
labYes2.Visible = True
labNo2.Visible = False
End If
End Sub |
Partager