hey Bob
I created a standard module called PrintCount with a
procedure by the name of PrintCount as well. In the
procedure I put the following code:
Static PrintCounter
Dim RngCounter As Long
If PrintCounter > 0 Then
RngCounter = Application.WorksheetFunction.CountA
(Worksheets("Wkly Renewals").Range("D

"))
With CreateObject("Wscript.Shell")
.Popup "The name of the active printer is " &
Application.ActivePrinter _
, 1, "Print Confirmation", 64
End With
Worksheets("Wkly Renewals").Range("D7:F" & RngCounter +
2).PrintOut
Else
If MsgBox("The name of the active printer is " &
Application.ActivePrinter & vbCrLf & _
"Do you want to use this printer?" & vbCrLf & _
"" & vbCrLf & _
"Click no to select a different printer.", vbYesNo) = vbNo
Then
RngCounter = Application.WorksheetFunction.CountA
(Worksheets("Wkly Renewals").Range("D

"))
ActiveSheet.PageSetup.PrintArea = "$D$7:$F$" & RngCounter
+ 2
PrintCounter = PrintCounter + 1
Application.Dialogs(xlDialogPrint).Show
ActiveSheet.PageSetup.PrintArea = ""
Else
PrintCounter = PrintCounter + 1
RngCounter = Application.WorksheetFunction.CountA
(Worksheets("Wkly Renewals").Range("D

"))
Worksheets("Wkly Renewals").Range("D7:F" & RngCounter +
2).PrintOut
End If
End If
PrintCounter = PrintCounter + 1
With CreateObject("Wscript.Shell")
.Popup "Print Job: " & PrintCounter _
, 1, "Print Number", 64
End With
Then in the Print button (commandbutton) code I put:
PrintCount.PrintCount
This way it calls the procedure with the static variable.
This works. My problem was I was just stuck on using the
beforeprint event which I had put in the workbook module.
This throwing me for a loop.
Thanx for everyones help!
Todd