0
Undo
Votes
Hi,
This is my code at module:
Sub PrintForm()
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintArea = "$A$1:$I$40"
.PrintTitleRows = "$1:$3"
.Zoom = 75
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Application.PrintCommunication = True
End Sub
This is my code at Workbook object:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel =True
End Sub
May I know how could I disable Print command but allow to print via macro, i.e. I would like to add a control that Macro PrintForm is only allowed to print through macro. Appreciate someone can help, thanks.
This is my code at module:
Sub PrintForm()
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintArea = "$A$1:$I$40"
.PrintTitleRows = "$1:$3"
.Zoom = 75
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Application.PrintCommunication = True
End Sub
This is my code at Workbook object:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel =True
End Sub
May I know how could I disable Print command but allow to print via macro, i.e. I would like to add a control that Macro PrintForm is only allowed to print through macro. Appreciate someone can help, thanks.
There are no replies made for this post yet.