Bonjour Bonjour !
Mon but est d'interdire la suppression de ligne mais pas dans une macro.
Actuellement j'ai :
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = Columns.Count Then
Application.EnableEvents = False
MsgBox "Suppression ligne annulée" & vbCrLf & " " & vbCrLf & "Utilisez la fonction masquer. MERCI", vbExclamation, " NE PAS SUPPRIMER LES LIGNES "
Application.Undo
Application.EnableEvents = True
End If
End Sub
mais quand je suprime une ligne dans une mcro ca plante...
Comment faire ???
Mon but est d'interdire la suppression de ligne mais pas dans une macro.
Actuellement j'ai :
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = Columns.Count Then
Application.EnableEvents = False
MsgBox "Suppression ligne annulée" & vbCrLf & " " & vbCrLf & "Utilisez la fonction masquer. MERCI", vbExclamation, " NE PAS SUPPRIMER LES LIGNES "
Application.Undo
Application.EnableEvents = True
End If
End Sub
mais quand je suprime une ligne dans une mcro ca plante...
Comment faire ???