Qui pourrait me dire pourquoi ce code me renvoie "incompatibilité de type"
quand je saisis par erreur une lettre, ou rien, et comment corriger ?
D'avance, Merci.
Dim NbSal
Dim n As Byte
NbSal = InputBox( "Entrez un nombre entre 1 et 10", "SACA -
Administration : Nombre à créer")
Application.ScreenUpdating = False
'Si l'usager annule l'opération
If NbSal < 1 And NbSal > 10 And NbSal = "" Then Exit Sub
For n = 1 To NbSal
Range("A:C").Copy
Application.Goto Reference:="Décaler"
ActiveCell.Offset(0, -3).Insert Shift:=xlToRight
Calculate
Next
Application.ScreenUpdating = True
MsgBox "C'est fait!", , "SACA - Création de fiches salarié"