Private Sub tbx_Nom_Exit(ByVal Cancel As MSForms.ReturnBoolean): tbx_Exit tbx_Nom, "Nom:": End Sub
Private Sub tbx_Nom_Keyup(ByVal keycode As MSForms.ReturnInteger, ByVal Shift As Integer): tbx_Keyup tbx_Nom, "Nom:", keycode: End Sub
Private Sub tbx_Nom_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single): tbx_MouseUp tbx_Nom, "Nom:": End Sub
Private Sub tbx_Prenom_Exit(ByVal Cancel As MSForms.ReturnBoolean): tbx_Exit tbx_Prenom, "Prenom:": End Sub
Private Sub tbx_Prenom_Keyup(ByVal keycode As MSForms.ReturnInteger, ByVal Shift As Integer): tbx_Keyup tbx_Prenom, "Prenom:", keycode: End Sub
Private Sub tbx_Prenom_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single): tbx_MouseUp tbx_Prenom, "Prenom:": End Sub
Private Sub tbx_age_Exit(ByVal Cancel As MSForms.ReturnBoolean): tbx_Exit tbx_age, "Age:": End Sub
Private Sub tbx_age_Keyup(ByVal keycode As MSForms.ReturnInteger, ByVal Shift As Integer): tbx_Keyup tbx_age, "Age:", keycode: End Sub
Private Sub tbx_age_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single): tbx_MouseUp tbx_age, "Age:": End Sub
Private Sub tbx_Exit(ByRef tbx, prefixe)
With tbx
If .Value = "" Then .Value = prefixe: .ForeColor = RGB(220, 220, 220)
End With
End Sub
Private Sub tbx_Keyup(ByRef tbx, prefixe$, keycode)
With tbx
If .Value = prefixe Then .Value = ""
Select Case keycode
Case 8 , 46: If .Value = Left(prefixe, Len(prefixe) - 1) And keycode = 8 Then keycode = 0: .Value = prefixe: .ForeColor = RGB(220, 220, 220): Exit Sub
Case 48 To 90, 96 To 105
Case Else
End Select
If .Value = "" Then .Value = prefixe
End With
End Sub
Private Sub tbx_MouseUp(ByRef tbx, prefixe)
With tbx
If .Value = prefixe Then .Value = "": .ForeColor = vbBlack
End With
End Sub