#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Stop pinting

I have a spreadsheet I need to share but which I've protected so no-one can
edit but is it possible to stop them printing it out?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Stop pinting

hi
you could use the before print event.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox ("Printing this file is forbidden.")
Cancel = True
End Sub

open the vb editor (Alt+F11)
in the project window(far left) expand your project(file).
double click "this workbook"
in the code window(far right) click the left drop down arrow.
Click "workbook"
the workbook open event should default. delete it and paste the above code
into the code window.
close the vb editor. save the file.
note: with this code...NO ONE can print.
to remove the code, follow the above procedure except delete the before
print code. now everyone can print again.

Regards
FSt1

"Tricia" wrote:

I have a spreadsheet I need to share but which I've protected so no-one can
edit but is it possible to stop them printing it out?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Stop pinting

Thank you.

"FSt1" wrote:

hi
you could use the before print event.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox ("Printing this file is forbidden.")
Cancel = True
End Sub

open the vb editor (Alt+F11)
in the project window(far left) expand your project(file).
double click "this workbook"
in the code window(far right) click the left drop down arrow.
Click "workbook"
the workbook open event should default. delete it and paste the above code
into the code window.
close the vb editor. save the file.
note: with this code...NO ONE can print.
to remove the code, follow the above procedure except delete the before
print code. now everyone can print again.

Regards
FSt1

"Tricia" wrote:

I have a spreadsheet I need to share but which I've protected so no-one can
edit but is it possible to stop them printing it out?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Stop pinting

Tricia

This can be circumvented by users not enabling macros when they open the
workbook, so don't think the code alone will stop the printing.


Gord Dibben MS Excel MVP

On Mon, 25 Feb 2008 13:07:07 -0800, Tricia
wrote:

Thank you.

"FSt1" wrote:

hi
you could use the before print event.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox ("Printing this file is forbidden.")
Cancel = True
End Sub

open the vb editor (Alt+F11)
in the project window(far left) expand your project(file).
double click "this workbook"
in the code window(far right) click the left drop down arrow.
Click "workbook"
the workbook open event should default. delete it and paste the above code
into the code window.
close the vb editor. save the file.
note: with this code...NO ONE can print.
to remove the code, follow the above procedure except delete the before
print code. now everyone can print again.

Regards
FSt1

"Tricia" wrote:

I have a spreadsheet I need to share but which I've protected so no-one can
edit but is it possible to stop them printing it out?


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
Pinting to fit jostlund Excel Discussion (Misc queries) 11 December 18th 07 04:48 PM
1 becomes 10, how can I stop this HerbalDave New Users to Excel 4 June 30th 06 02:06 PM
To Stop or Not to Stop BillCPA Excel Discussion (Misc queries) 0 June 22nd 06 03:41 PM
How do I stop other circles in other cells to stop selecting? stauff Excel Worksheet Functions 2 October 29th 04 09:02 PM
How do I stop other circles in other boxes to stop selecting? stauff Excel Worksheet Functions 1 October 28th 04 10:27 PM


All times are GMT +1. The time now is 01:36 AM.

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

About Us

"It's about Microsoft Excel"