Problème [VB]

Bonjour,

svp, comment attribuer l'action du bouton OK à la touche ENTER en vb?

Merci.

2 réponses

  • Votes
  • Date
  • Date décroissante
  1. Si ton bouton s'apelle cmdOk, alors tu peux utiliser la fonction DEFAULT de ton bouton.

    Exp:
    Private Sub Form_Load()
    cmdCancel.Cancel = True ' est associé à Escape
    cmdOk.Default = True ' est associé à Enter
    End Sub

    Pas d'excitation prolongée sans avis médical