Code VBA pour modif

Bonjour

Dans le code suivant je cherche le moyen d'afficher le msgBox vb yes ou no pour la modif

Si vous avez une idée

je vous remercie

Private Sub CommandButton3_Click()
'bouton modifier
Dim modif As Integer
If Not ComboBox1.Value = "" Then
Sheets("Feuil1").Select
modif = ComboBox1.ListIndex + 2
Cells(modif, 2) = TextBox1.Value
Cells(modif, 1) = ComboBox1.Value
Cells(modif, 3) = TextBox2.Value
Cells(modif, 4) = TextBox3.Value
Cells(modif, 5) = TextBox4.Value

MsgBox ("Veuillez sélectionné le PRODUIT a modifier")

 MsgBox ("Modification effectuer")

Else
Exit Sub
End If

Bonjour,

Je ne suis pas certain d'avoir compris la demande.

Pour utiliser un msgbox de type YesNo, la syntaxe de base est :

dim answer&
answer = MsgBox("Confirmer la modification ?", vbYesNo)
if answer = vbYes then
    'Instructions pour effectuer la modification
else
    'Instructions pour annuler la modification
end if

Dites-moi si cela répond à votre demande ;)

Bonjour

Merci après aménagement fonctionne très bien

Crdlt

Rechercher des sujets similaires à "code vba modif"