Sub Nv_Demande()
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
Dim NvDde As String
'Désactive les lignes filtrées éventuelles
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
'nommer la ligne
NvDde = InputBox("N°", "Demande", "14-")
nblignes = Application.InputBox("Nb à inserer", "Demande 1", "1", Type:=1)
If 1 < CLng(nblignes) < 27 Then ' + de il n' ya que 26 lettres , si plus il faut savoir comment tu veux faire.
For i = nblignes To 1 Step -1
Rows(3).Insert shift:=xlDown
Range("A3") = NvDde & "." & Chr(64 + i)
Next i
End If
If NvDde = "" Then
'ne pas créer
Rows("3:3").Delete
MsgBox "Demande annulée ...", vbExclamation, "Création de la Demande": Exit Sub
End If
'Mise en forme par centrage vertical de la ligne
Rows("2:2").Select
Selection.VerticalAlignment = xlCenter
Range("A2").Select
'Récupération de la mise en forme conditionnelle sur une ligne close
Rows("10:10").Select
Selection.Copy
Rows("3:3").Select
Selection.PasteSpecial Paste:=xlPasteFormats
Rows("3:3").EntireRow.AutoFit
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub