bonjour, j’ai une macro ci-joint, avec deux conditions et instructions pour chacunes d’entre elles. Mon problème est que la réponse oui et non ce mélange malgré l’utilisation du else. Je sais que je l’ai mal utiliser mais je ne vois pas comment faire …
merci de votre aide !
Sub partie_5()
MsgBox « quitter », vbInformation + vbYesNo, « mon programme »
If reponse = « oui » Then MsgBox « Au revoir ! »
Application.Quit
else
If reponse = « non » Then MsgBox « on continue alors ? », vbQuestion
For i = 1 To 13
For ni = 1 To 6
Cells(i, ni).Borders.Value = 1
Cells(1, ni).Interior.ColorIndex = 6
Next
Next
Range(« A1 »).FormulaR1C1 = « Civilité »
Range(« B1 »).FormulaR1C1 = « Nom »
Range(« C1 »).FormulaR1C1 = « Prénom »
Range(« D1 »).FormulaR1C1 = « Adresse »
Range(« E1 »).FormulaR1C1 = « Lieu »
Range(« F1 »).FormulaR1C1 = « Pays »
Range(« A1:F1 »).Select
With Selection
.HorizontalAlignment = xlCenter
.Font.Name = "Time roman"
.Font.Size = 12
Range(« A2 »).Select
End With
End Sub