J
jatman
i had the following macro that worked in Office 2003, but in Office 2007 it
does not work. It prevents the print job once only, but the user can just
press the print again and it prints...Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "DSR" Then
Cancel = True
Application.EnableEvents = False
With ActiveSheet
If .Range("d1") <> "[Ctrl] ;" And Range("d57") = 0# And
Range("d5") <> 0# Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Call Mail
End If
End With
End If
End Subany suggestions to help prevent the print job would be appreciated.
thank you,
jat
does not work. It prevents the print job once only, but the user can just
press the print again and it prints...Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "DSR" Then
Cancel = True
Application.EnableEvents = False
With ActiveSheet
If .Range("d1") <> "[Ctrl] ;" And Range("d57") = 0# And
Range("d5") <> 0# Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Call Mail
End If
End With
End If
End Subany suggestions to help prevent the print job would be appreciated.
thank you,
jat