AW: Tabellenblätter laut Namensliste anlegen und benne
16.07.2009 16:39:58
Rudi
Hallo,
Sub SheetsAnlegenAusListe()
Dim i As Integer, wks As Worksheet
Application.ScreenUpdating = False
With Sheets("Namen")
For i = 2 To .Cells(.Rows.Count, 1).End(xlUp).Row
On Error Resume Next
Set wks = Worksheets(.Cells(i, 1).Text)
On Error GoTo 0
If wks Is Nothing Then
Worksheets("Vorlage").Copy after:=Sheets(Worksheets.Count)
ActiveSheet.Name = .Cells(i, 1)
End If
Set wks = Nothing
Next i
SheetSortName 3
.Activate
End With
Application.ScreenUpdating = True
End Sub
Sub SheetSortName(iFirstSheet As Integer)
Dim x As Integer, y As Integer, wsCount As Integer
Application.ScreenUpdating = False
wsCount = ActiveWorkbook.Worksheets.Count
For x = iFirstSheet To wsCount
For y = x To wsCount
If UCase(Worksheets(y).Name)
Gruß
Rudi