Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1.Value = "" Then
MsgBox "Il faut donner une valeur!"
Cancel = True
End If
End Sub
Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With Me.TextBox2
If IsNumeric(.Value) = False Or .Value < 100 Then
MsgBox "Il faut donner une valeur >100 !"
.SelStart = 0
.SelLength = Len(.Value)
Cancel = True
End If
End With
End Sub
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then End
End Sub