AW: Worksheets auswählen Lösung
19.09.2003 08:12:05
junny
Hai Willie,
weiß nicht wie ich den Code einbinden soll,
unten steht mein bisheriger. Ich will ereichen, dass ich die Tabellenblätter welche in der selben Zelle angesprochen werden, zusammenfassen kann.
Gruss junny
'Makro erstellt von v.w. 25.08.03
Sub FlexiblerDruckbereich()
Dim Ende As Integer
'Druckbereich aufheben
Worksheets("Holzliste").PageSetup.PrintArea = ""
'Feststellen Letzte Benutzte Zeile
Ende = Range("E" & Rows.Count).End(xlUp).Row
'Druckbereich festlegen
Worksheets("Holzliste").PageSetup.PrintArea = "$A$1:$U$" & Ende
Worksheets("Holzliste").PrintOut Copies:=1, Collate:=True
'Beschlaglisten drucken
If Worksheets("BL leer").Cells(5, 2) <> "" Then
Worksheets("BL leer").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Serpenda").Cells(5, 2) <> "" Then
Worksheets("BL Serpenda").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Sky").Cells(5, 2) <> "" Then
Worksheets("BL Sky").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL O,T+S").Cells(5, 2) <> "" Then
Worksheets("BL O,T+S").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Opinio").Cells(5, 2) <> "" Then
Worksheets("BL Opinio").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Ceo Theke").Cells(5, 2) <> "" Then
Worksheets("BL Ceo Theke").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Conside").Cells(5, 2) <> "" Then
Worksheets("BL Conside").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Griffe").Cells(5, 2) <> "" Then
Worksheets("BL Griffe").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL OTS Schränke-Tisch").Cells(5, 2) <> "" Then
Worksheets("BL OTS Schränke-Tisch").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Comitas").Cells(5, 2) <> "" Then
Worksheets("BL Comitas").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Depona").Cells(5, 2) <> "" Then
Worksheets("BL Depona").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Dental").Cells(5, 2) <> "" Then
Worksheets("BL Dental").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Com.Einsätze").Cells(5, 2) <> "" Then
Worksheets("BL Com.Einsätze").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Ratio").Cells(5, 2) <> "" Then
Worksheets("BL Ratio").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Prophylaxe").Cells(5, 2) <> "" Then
Worksheets("BL Prophylaxe").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Ceo Schreibt").Cells(5, 2) <> "" Then
Worksheets("BL Ceo Schreibt").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Konferenztisch").Cells(5, 2) <> "" Then
Worksheets("BL Konferenztisch").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Rolladen").Cells(5, 2) <> "" Then
Worksheets("BL Rolladen").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Kabinentrennwand").Cells(5, 2) <> "" Then
Worksheets("BL Kabinentrennwand").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL Prego-Garderobe").Cells(5, 2) <> "" Then
Worksheets("BL Prego-Garderobe").PrintOut Copies:=1, Collate:=True
End If
If Worksheets("BL ComWagen").Cells(6, 2) <> "" Then
Worksheets("BL ComWagen").PrintOut Copies:=1, Collate:=True
End If
End Sub