Private Sub Worksheet_Change(ByVal Target As Range)
If Selection.Cells.Count = 256 Then 'un seule ligne
MsgBox "Coucou" 'tu adapteras...
End If
If Selection.Cells.Count Mod 256 = 0 Then 'plusieurs lignes
MsgBox "Coucou" 'tu adapteras...
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = Application.Columns.Count Then MsgBox "trop tard !!!"
End Sub
je ne pense pas que cela pose un problème à Johan.J'essaie de trouver une méthode pour lancer une macro dès qu'une ligne est supprimée ....
Public tablo() As Variant, tablof() As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Selection.Cells.Count mod 256 = 0 Then
Application.EnableEvents = False
If MsgBox("Confirmez vous la suppression", vbYesNo) = vbNo Then
Selection.Insert
Selection.Value = tablo
Selection.Formula = tablof
End If
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
tablo = Selection.EntireRow.Value
tablof = Selection.EntireRow.Formula
End Sub