zigulawrotka
New Member
- Joined
- Jun 20, 2017
- Messages
- 4
Hello,
It is my first post here, usually I'm able to sort out my issues with others posts -but this time i'm stuck. I'm just a beginner but trying my best to learn as much as I can.
I have recently moved from excel 2010 to 365. I was using macro in "This Workbook" to simply prevent worksheet from printing. Since I have moved to new excel macro does not prevent from printing. I know it fires because after I press print - I'm getting a message box from it but after I click OK it goes to print.
I have tried with/without
also with/without
Each time I get message box - click ok and it goes to print. If you have any ideas in what I could check please let me know - it will be much appreciated.
Thanking you in advance!
It is my first post here, usually I'm able to sort out my issues with others posts -but this time i'm stuck. I'm just a beginner but trying my best to learn as much as I can.
I have recently moved from excel 2010 to 365. I was using macro in "This Workbook" to simply prevent worksheet from printing. Since I have moved to new excel macro does not prevent from printing. I know it fires because after I press print - I'm getting a message box from it but after I click OK it goes to print.
Code:
Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.EnableEvents = True
Debug.Print "Running Workbook_BeforePrint"
MsgBox "Printing Disabled"
Cancel = True
End Sub
I have tried with/without
Code:
Application.EnableEvents = True
Code:
Debug.Print "Running Workbook_BeforePrint"
Thanking you in advance!