Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default MACRO OR VBA CODE TO PREVENT USERS FROM PRINTING THE CONTENTS OF A WORKSHEET?

Hi,

Does anyone know the macro or VBA code to prevent users from printing
a worksheet. They can edit, view, but they CANNOT print the contents
of a worksheet. Please explain exactly what I need to do where I
place the code and so forth. Your help with this would be greatly
appreciated. Please respond via email to:



Thanks for any help you may give.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default MACRO OR VBA CODE TO PREVENT USERS FROM PRINTING THE CONTENTS OF A WORKSHEET?

Marcello,

Put this code in the THisWorkbook code module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
End Sub

In the VB IDE, in the project explorer window, double-click on the
ThisWorkbook object, and when the code pane opens, put that code in it.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Marcello do Guzman" wrote in message
...
Hi,

Does anyone know the macro or VBA code to prevent users from printing
a worksheet. They can edit, view, but they CANNOT print the contents
of a worksheet. Please explain exactly what I need to do where I
place the code and so forth. Your help with this would be greatly
appreciated. Please respond via email to:



Thanks for any help you may give.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
code to prevent users from adding new worksheets jat Excel Worksheet Functions 2 March 18th 09 08:24 PM
Prevent user from copying contents of a worksheet Chuck M Excel Discussion (Misc queries) 2 August 28th 08 02:28 AM
How do I prevent cell contents from printing? Tristan Excel Discussion (Misc queries) 2 March 1st 06 10:17 AM
How do I prevent users to delete a worksheet, but allow to edit? [email protected] Excel Discussion (Misc queries) 2 September 1st 05 08:37 PM
prevent users from overwriting other users data [email protected] Excel Worksheet Functions 0 April 17th 05 08:18 PM


All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"