View Single Post
  #5   Report Post  
Ken Wright
 
Posts: n/a
Default

How about a single routine that does all 4 prints. Not tested, but

Sub delivery_copy()

Dim sh As Worksheet
Dim myval As String

For x = 1 To 4
Select Case x
Case 1: myval = "Client Copy"
Case 2: myval = "Delivery Copy"
Case 3: myval = "Filing Copy"
Case 4: myval = "Dock Copy"
End Select

For Each sh In ThisWorkbook.Worksheets
sh.Range("E4").Value = myval
Next sh
Worksheets.PrintOut
Next x

End Sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Peter" wrote in message
...
Hello All..

I am trying to get my worksheets to play nicely..but no success.

I have say 10 worksheets, and in cell "B4" I have Client Copy (across all
sheets), so it needs to print all those sheets...
Then I need to change "B4" to Delivery Copy, then print all those sheets,
etc etc

Problem is at the moment, it goes through all the sheets, and only prints
the Dock Copy sheets (the last set). I see the text at "B4" change to what

it
should, but just keeps going and ignoring the print call.

Sub delivery_copy()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
With sh
Range("E4").Select
ActiveCell = "Delivery Copy"
End With
Next sh
Worksheets.PrintOut

End Sub

I am using this in four seperate modules, each called from Sub
Workbook_BeforePrint.
As always, any advice is welcomed.

Regards
Peter