bonjour,
un essai
Sub messagesatisfaction()
Dim resultat As String, DL As Long, Col As Integer, msg As String
With Worksheets("BDD")
DL = .Range("A" & Rows.Count).End(xlUp).Row + 1
resultat = InputBox("Pouvez-vous s'il vous plaît, nous indiquer votre nom, prénom et votre société?", "Informations satisfaction") 'La variable reçoit la valeur entrée dans l'InputBox
If resultat <> "" Then 'Si la valeur est différente de "" on affiche le résultat
'MsgBox resultat
Select Case Right(Application.Caller, 1) 'en fonction N°image
Case 5
msg = "TRES SATISFAISANT"
Col = 2
Case 4
msg = "SATISFAISANT"
Col = 3
Case 3
msg = "PAS SATISFAISANT"
Col = 4
End Select
.Cells(DL, 1) = Date
.Cells(DL, Col) = msg
.Cells(DL, 5) = resultat
End If
End With
End Sub
cette macro doit être affectée à chaque image
A+