AW: Nur bestimmte Tabellen Abspeichern
15.08.2007 22:42:00
Gerd
Hallo Johenn,
probier mal.
Sub test()
Dim varCopyValuesSheets As Variant, strBereich As String, x As Integer, i As Integer
varCopyValuesSheets = Array("Tabelle1", "Tabelle3", "Tabelle4", "Tabelle5", "Tabelle6") ' _
anpassen
x = Application.SheetsInNewWorkbook
Application.SheetsInNewWorkbook = UBound(varCopyValuesSheets) + 1
Application.ScreenUpdating = False
Workbooks.Add
For i = 0 To UBound(varCopyValuesSheets)
ThisWorkbook.Worksheets(varCopyValuesSheets(0)).UsedRange.Copy
strBereich = ThisWorkbook.Worksheets(varCopyValuesSheets(i)).UsedRange.Address
ActiveWorkbook.Worksheets(i + 1).Range(strBereich).PasteSpecial (xlPasteValues)
Next
Application.SheetsInNewWorkbook = x
Application.ScreenUpdating = True
End Sub
Gruß Gerd