Skip to main content
Support is Offline
Today is our off day. We are taking some rest and will come back stronger tomorrow
Official support hours
Monday To Friday
From 09:00 To 17:30
  Saturday, 15 September 2018
  0 Replies
  2.4K Visits
0
Votes
Undo
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.
There are no replies made for this post yet.