wie kann ich per VBA einmalig eine gewisse Anzahl Tabellen erstellen, z.B.
Blatt 01
Blatt 02
Blatt xx
Vielen Dank Robert
Sub neueBlaetter()
Dim i As Integer, iAnz As Variant, wks As Worksheet, strFormat As String
iAnz = InputBox("Anzahl")
If iAnz <> "" Then
strFormat = WorksheetFunction.Rept("0", Len(iAnz))
For i = 1 To iAnz * 1
Set wks = Worksheets.Add(after:=Worksheets(Worksheets.Count))
wks.Name = "Blatt_" & Format(i, strFormat)
Next i
End If
End Sub
Gruß