Sub Ligne_insérer_si_emplacement_ok()
Dim n, L As Range
Dim u As String
Set L = ActiveCell.EntireRow
ActiveSheet.Unprotect
If Selection.Row < 18 Then
MsgBox "NON, NON Vous ne pouvez pas faire ça !"
Else
n = InputBox("Combien de ligne voulez-vous insérer ?", "Choix", 1) 'nombre de lignes à insérer
Rows("14:1058").EntireRow.Hidden = False
ActiveSheet.Outline.ShowLevels RowLevels:=2
Rows("1:1").EntireRow.Hidden = True
L(2).Resize(n).Insert
Rows(1).EntireRow.Hidden = False
Rows(1).Copy L(2).Resize(n)
L(2).Resize(n).RowHeight = L(n - 1).RowHeight
Rows(1).EntireRow.Hidden = True
Cells(L.Row, 2).Select
End If
End Sub