Hello!
Is there a code that can be input to prevent a document from being printed?
Thank you!
Hello!
Is there a code that can be input to prevent a document from being printed?
Thank you!
Hi there,
of course there is... :-)
See 'ThisWorkbook' events in VBA and You will find 'BeforePrint' event and with one row of code you disable printing:
Hope it helpsPlease Login or Register to view this content.
Regards
Miroslav R.
(If You like my solutions, feel free to add reputation.)
I went to the 'ThisWorkbook' in the VBA but I didn't see an option to (1) input a code for the Workbook (only the Worksheets) or (2) an option for 'BeforePrint'. The only options I see for printing is 'PersonalViewPrintSettings' with True or False as my selections. I'm a beginner with VBA so I know I'm probably looking in the wrong spot. Would you be able to be a little more specific on where I can find this setting and input the code?
Thank you so much!!
Just copy and paste the whole code in 'ThisWorkbook'.
What happens if a user doesn't enable macros?
Entia non sunt multiplicanda sine necessitate
Ok, I found where to input the code for ThisWorkbook and BeforePrint and then I saved it and closed the file; however, when I opened it back up, I was still able to print. Is there something else that I should be doing?
Thanks!!
Did you enable the macros?
Ok, if I enable the macros the code works; however, due to security settings I'm not able to set a folder as a Trust Location on the shared drive where it's going to be housed for multiple user access, so, I'm thinking I'm just not going to be able to utilize it like I'd hoped. Thanks so much for all of the help!!!
You can hide the sheets leaving a blank sheet with a message to enable macros, when you open the file you see only the sheet with the message and when you enable the macros it will unhide the other sheets and hide the sheet with the message. Just saying.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks