Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() Hi C Wayne Slight change of plan to my answer here, because you only want to prevent some documents being printed, not all. If the print button is disabled it will be a workbook-wide thing, not just limited to certain workbooks. The code below will leave the Print option untouched but when a user tries to print the workbook a message is generated and the print job aborted. Private Sub Workbook_BeforePrint(cancel As Boolean) cancel = True MsgBox "This page cannot be printed." End Sub This code needs to be copied into the ThisWorkbook pane of each workbook you want to control printing of (to get here press alt + f11 and double click ThisWorkbook in the top left hand pane. this code will be saved with your file next time you save. HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=378459 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
A user says he can't get my drop down list to work in Excel. | Excel Discussion (Misc queries) | |||
How do I prevent data truncation from access to excel using MS Qu. | Excel Worksheet Functions | |||
Printing in Excel | New Users to Excel | |||
Columns in Excel will not allow user to click in them | Excel Discussion (Misc queries) | |||
how would i change default user name all excel files | Excel Discussion (Misc queries) |