rchristian
XLDnaute Nouveau
Bonjour,
Dans la macro suivante :
Sub InsertFeuilleM2()
'Déclaration des variables
Dim I As Long
For I = 1 To 60
Sheets("ModelM2").Copy after:=Worksheets(Worksheets.Count)
'ActiveSheet.Copy after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = "M2PlaceB" & Format(I, "000")
ActiveSheet.Range("X2") = "B" & Format(I, "000")
ActiveSheet.Protect UserInterfaceOnly:=True
Next I
End Sub
je voudrais vérifier si la feuille "M2PlaceB001" existe avant de lancer la procédure.
Avez vous un solution ? merci d'avance.
Christian
Dans la macro suivante :
Sub InsertFeuilleM2()
'Déclaration des variables
Dim I As Long
For I = 1 To 60
Sheets("ModelM2").Copy after:=Worksheets(Worksheets.Count)
'ActiveSheet.Copy after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = "M2PlaceB" & Format(I, "000")
ActiveSheet.Range("X2") = "B" & Format(I, "000")
ActiveSheet.Protect UserInterfaceOnly:=True
Next I
End Sub
je voudrais vérifier si la feuille "M2PlaceB001" existe avant de lancer la procédure.
Avez vous un solution ? merci d'avance.
Christian