O
ordnance1
Sorry for the cross posting, but I had posted this to the wrong forum
I want to prevent ptinting of my workbook without using the macro I
have set up for printing. I entered the code below to prevent
printing, but it also prevents my macro from printing. Any ideas how
I
can get around this, or it an all or nothing kind of thing? Also
below
is my print macro.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
msg = MsgBox("Sorry, printing is disabled for this workbook.",
vbCritical)
Cancel = True
End Sub
Private Sub CommandButton2_Click()
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Module2.SortSunday
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Module2.UnSort_AllDays
Unload UserFormPrinting_Sunday
End Sub
I want to prevent ptinting of my workbook without using the macro I
have set up for printing. I entered the code below to prevent
printing, but it also prevents my macro from printing. Any ideas how
I
can get around this, or it an all or nothing kind of thing? Also
below
is my print macro.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
msg = MsgBox("Sorry, printing is disabled for this workbook.",
vbCritical)
Cancel = True
End Sub
Private Sub CommandButton2_Click()
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Module2.SortSunday
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Module2.UnSort_AllDays
Unload UserFormPrinting_Sunday
End Sub