V
viny123456789
Guest
Bonjour a tous et merci d'avance
Voila mon travail je cherche le moyen d'arreter la macro en appuyant sur no quand on arrive a la ligne pause = etc...
j'ai beau cliquer no la macro continue
aider moi merci
Sub pretrem0()
Dim W3 As Worksheet
Dim W4 As Worksheet
Set W3 = Sheets("Prêt")
If W3.[B22] = 0 Then MsgBox "Le code livre " & W3.[B22] & " n'est pas reconnus ": Exit Sub
If W3.[B22] = "<CODE>" Then MsgBox "Le code livre " & W3.[B22] & " n'est pas reconnus ": Exit Sub
pause = MsgBox("ATTENTION ANNULATION DE LA FICHE DU LIVRE " & W3.[B22] & " CE LIVRE SERA DE NOUVEAU DISTRIBUABLE ", vbYesNo)
Application.ScreenUpdating = False
Sheets("Listing Général").Select
Cells((Cells(4, 7)), 3).Select
Selection.ClearContents
Application.CutCopyMode = False
Cells((Cells(4, 7)), 4).Select
Selection.ClearContents
Application.CutCopyMode = False
Cells((Cells(4, 7)), 5).Select
Selection.ClearContents
Application.CutCopyMode = False
Sheets("Prêt").Select
Range("B22").Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = "<CODE>"
Application.ScreenUpdating = True
End Sub
Voila mon travail je cherche le moyen d'arreter la macro en appuyant sur no quand on arrive a la ligne pause = etc...
j'ai beau cliquer no la macro continue
aider moi merci
Sub pretrem0()
Dim W3 As Worksheet
Dim W4 As Worksheet
Set W3 = Sheets("Prêt")
If W3.[B22] = 0 Then MsgBox "Le code livre " & W3.[B22] & " n'est pas reconnus ": Exit Sub
If W3.[B22] = "<CODE>" Then MsgBox "Le code livre " & W3.[B22] & " n'est pas reconnus ": Exit Sub
pause = MsgBox("ATTENTION ANNULATION DE LA FICHE DU LIVRE " & W3.[B22] & " CE LIVRE SERA DE NOUVEAU DISTRIBUABLE ", vbYesNo)
Application.ScreenUpdating = False
Sheets("Listing Général").Select
Cells((Cells(4, 7)), 3).Select
Selection.ClearContents
Application.CutCopyMode = False
Cells((Cells(4, 7)), 4).Select
Selection.ClearContents
Application.CutCopyMode = False
Cells((Cells(4, 7)), 5).Select
Selection.ClearContents
Application.CutCopyMode = False
Sheets("Prêt").Select
Range("B22").Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = "<CODE>"
Application.ScreenUpdating = True
End Sub