Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'll be the first to admit that I'm a rookie at this whole VBA thing. All of the code that I'm currently using in my workbook is totally accredited to information I've found through searching and posting in this forum. I have virtually no comprehension of the syntax or logic involved in writing my own code. So, please feel free to answer this question in the most elementary way possible. I've successfully employed code to prevent users of my workbook from printing. The following code was written to "This Workbook": Private Sub Workbook_BeforePrint(Cancel As Boolean) Cancel = True MsgBox "Information contained in this workbook cannot be printed" End Sub Here is my problem...I cannot seem to find a way to trigger this event with a button instead of triggering upon opening the workbook. There are some instances where a few users (with password privileges) may have to print a page from the workbook before forwarding it on to the ultimate end user who cannot print anything. If there was some way to toggle this print prevention with a button it would be perfect! Can anyone help?? -- zenahs ------------------------------------------------------------------------ zenahs's Profile: http://www.excelforum.com/member.php...o&userid=28681 View this thread: http://www.excelforum.com/showthread...hreadid=515420 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
stumped | Excel Worksheet Functions | |||
Stumped bad, need help please! | Excel Worksheet Functions | |||
Stumped | Excel Discussion (Misc queries) | |||
Stumped | Excel Programming | |||
Stumped | Excel Programming |