passer à une autre feuille
bjr à tous
j'ai développer une macro dans vba excel dont le but est de comparer les problèmes avec les pièces de rechange et me donne un MsgBox lorsque j'active la feuille.
Code:
1 2 3 4 5 6 7 8
| Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name <> "Récap" And Sh.Name <> "suiviWP" Then
If Application.CountA(Range("d36:d41")) <> Application.CountA(Range("n51:n61")) Then
MsgBox (" " & Application.CountA(Range("d36:d41")) & " Problème (s)" & vbCrLf _
& "et " & Application.CountA(Range("n51:n61")) & " Pièce (s) à changer")
End If
End If
End Sub |
est ce que je peux avoir une macro qui me bloque si je veux passer à un autre feuille au quitter execl ( si bien sûr :
Code:
Application.CountA(Range("d36:d41")) <> Application.CountA(Range("n51:n61"))
)
merci infiniment.