View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Added Piggy-back question

GS brought next idea :
Sub PrintReports()

Dim wks As Worksheet
Application.ActivePrinter = "\\SPRN01\WoW HDC on Ne02:"
For Each wks In ActiveWindow.SelectedSheets
If Set_PageSetup(wks, wks.Range("LHdrText")) Then
.PrintOut Preview:=True
wks.CenterHeader = "": wks.PrintArea = ""
Else
MsgBox "An error occured doing PageSetup for sheet '" _
& wks.Name & "'!"
End If
End Sub


In the above sub I forgot to Dim the var 'wks', so revise it as per the
line I inserted above. -Sorry about that...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc