Ich blende Tabellenblätter aus, da diese nicht mehr beschrieben werden sollen. Nun möchte ich alle Blätter, die nicht sichtbar sind drucken.
wie macht man das per VBA?
wer kann mir helfen?
Grüße und danke
Sub AusgeblDrucken()
Dim lngAus As Long, wks As Worksheet
For Each wks In Worksheets
lngAus = wks.Visible
If Not lngAus = xlSheetVisible Then
With wks
.Visible = xlSheetVisible
.PrintOut
.Visible = lngAus
End With
End If
Next
End Sub
Sub drucken
for each blatt in thisworkbook.worksheets
if blatt.visible=false then
blatt.visible=true
blatt.printout
blatt.visible=false
end if
next blatt
End Sub
Viel Erfolg