lundi 3 août 2015

Intercepter touche Entrée dans un TextBox

Il suffit d'utiliser l'événement "KeyDown" et de vérifier si le code renvoyé correspond à la touche ENTREE

Private Sub TexBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = 13 Then
        'mon code
    End If
End Sub

Aucun commentaire:

Enregistrer un commentaire