Bonjour tout le monde.
Petite question :
J'utilise une Msgbox de la maniere suivante (voir en gras)
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 Private Sub CommandButton3_Click() Dim Plage As Range Set Plage = Range("C2:C65536").Find(TextBox15.Value) If Plage Is Nothing Then TextBox17.Value = "No Match" Else TextBox1.Value = Cells(Plage.Row, 1).Value Do Until Plage Is Nothing If MsgBox("Suivant", vbYesNo + vbInformation) = vbNo Then Exit Do Set Plage = Range("C2:C65536").FindNext(Plage) TextBox1.Value = Cells(Plage.Row, 1).Value Plage.Select Loop End If End Sub
Je souhaite supprimer cette lignepour ne plus utiliser de MsgBox mais un CommandButton.Code:If MsgBox("Suivant", vbYesNo + vbInformation) = vbNo Then Exit Do
Un truc du genreet si c"est CommandButton = Click alors ca donne le meme resultat que la msgbox.Code:if CommandButton = Not Click Then Exit Do
Merci pour votre aide