If Sheets("ClientsCoordonnées").Range("U3").Select > 0 Then
MsgBox ("Vous n'avez pas fini")
Dim réponse
réponse = MsgBox("Allé, on termine ?")
If réponse <> 7 Then
End If
Voudriez-vous me donner le coup de pouce ou de main ?
If Sheets("ClientsCoordonnées").Range("U3").Select > 0 Then
MsgBox ("Vous n'avez pas fini")
Dim réponse
réponse = MsgBox("Allé, on termine ?")
If réponse <> 7 Then
End If
Voudriez-vous me donner le coup de pouce ou de main ?
Sub test()
If Sheets("ClientsCoordonnées").Range("U3") > 0 Then
If MsgBox("Vous n'avez pas fini, on termine ?", 292, "Hé HOOOO") <> 7 Then
MsgBox "ici la macro pour terminer"
End If
End If
End Sub
Merci de m'avoir répondu si vite et pour le code qui fonctionne.
Voici ce que j'ai fait de votre code :
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call DebloqueFeuilles
ActiveWindow.DisplayHeadings = True
With Application
.MoveAfterReturn = True
.MoveAfterReturnDirection = xlToRight
Application.MoveAfterReturnDirection = xlToRight
End With
If Sheets("ClientsCoordonnées").Range("U3") > 0 Then
If MsgBox("VOUS AVEZ DES CONFIRMATIONS A FAIRE ? VOUS LE FAITES MAINTENANT ?", 292, "Hé HOOOO") = 7 Then
Else
Sheets("Confirmations").Select
Exit Sub
End If
End If
Sheets("A faire").Select
Application.EnableEvents = False
ActiveWorkbook.Save
ActiveWorkbook.RunAutoMacros Which:=xlAutoClose
End Sub
Mon dernier souci est que quand je réponds OUI à la box, il m'envoie sur la feuille "Confirmations" mais il ne sort pas de la macro (exit sub) et ferme le classeur.
'------------
If Sheets("ClientsCoordonnées").Range("U3") > 0 Then
If MsgBox("VOUS AVEZ DES CONFIRMATIONS A FAIRE ? VOUS LE FAITES MAINTENANT ?", 292, "Hé HOOOO") = 6 Then
Sheets("Confirmations").Select
Exit Sub
End If
End If
'-------------
Un grand merci encore une fois ..... ça fonctionne nickel
Il reste une petite chose qui ne marche pas :
Quand je répond oui, il me sélectionne pas la bonne feuille.
Je pense qu'il ne sort pas de la macro (exit sub).
Fichier joint
Bon WE,
Amicalement,
Lionel,