Preventing a file from being printed?

  • Thread starter Thread starter Michael Slater
  • Start date Start date
M

Michael Slater

Hi,

I'm using Excel 2003 in work and have a file that I need to post on the
network, but don't want people to be able to print the file. Does anyone
have any ideas?

I apologize if this is not the proper forum for this question.

Thanks,

Mike
 
You might be able to stop the users from doing a print, but I bet any
suggestion would involve macros and/or events. And macros and events can be
disabled and that suggestion wouldn't work.

There's no good way to stop printing in excel.
 
You might be able to stop the users from doing a print, but I bet any
suggestion would involve macros and/or events. And macros and events can be
disabled and that suggestion wouldn't work.

There's no good way to stop printing in excel.

... and worst case ... If you can see it on the screen, you can print it :)
 
Convert it to a PDF with "no printing allowed". You will need a later
version of Adobe Writer.
 
It's a work schedule that's constantly being updated. 40 employees printing
copies on a constant basis confuses things a little bit.

Thanks anyway. I'll consider other options.

Mike
 
Will this work for you? Put it in the "This Workbook" module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
MsgBox "Please do not try to print this schedule"
End Sub


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Dave Peterson said:
It may work until the user disables events or macros.

This of course is true and I know that there is nothing that you can do that
a knowledgeable user cannot circumvent. However, if the OP's staff are
anything like the Care Staff at the residential Centre for disabled people
where I used to work, where VBA was "magic" it may be sufficient to hide the
sheet on closing.

If that will suffice then to the OP: paste these macros into the Workbook
module of ThisWorkbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Visible = xlVeryHidden
'Use your own sheet name in place of "Sheet 1"
End Sub

Private Sub Workbook_Open()
Sheets("Sheet1").Visible = True
'Use your own sheet name in place of "Sheet 1"
End Sub


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Just an added note for the OP:

You cannot hide all the sheets in a workbook, you must always have at least
one sheet visible. If you want the work book to open on your Schedule sheet
then add to the Workbook_Open() code the line:

Sheets("Sheet1").Activate

Once again replacing "Sheet1" with your own sheet name.
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk


Sandy Mann said:
Dave Peterson said:
It may work until the user disables events or macros.

This of course is true and I know that there is nothing that you can do
that a knowledgeable user cannot circumvent. However, if the OP's staff
are anything like the Care Staff at the residential Centre for disabled
people where I used to work, where VBA was "magic" it may be sufficient to
hide the sheet on closing.

If that will suffice then to the OP: paste these macros into the Workbook
module of ThisWorkbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Visible = xlVeryHidden
'Use your own sheet name in place of "Sheet 1"
End Sub

Private Sub Workbook_Open()
Sheets("Sheet1").Visible = True
'Use your own sheet name in place of "Sheet 1"
End Sub


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Sandy,

Thank you very much....the first macro you posted should work fine. While I
do have some who like to tinker, they know better than to try to "get
around" that fix.

Thanks again,

Mike


Sandy Mann said:
Just an added note for the OP:

You cannot hide all the sheets in a workbook, you must always have at
least one sheet visible. If you want the work book to open on your
Schedule sheet then add to the Workbook_Open() code the line:

Sheets("Sheet1").Activate

Once again replacing "Sheet1" with your own sheet name.
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
You're welcoime.
Thank you very much....the first macro you posted should work fine. While
I do have some who like to tinker, they know better than to try to "get
around" that fix

In that case add, "OR ELSE!" at the end of the messagebox message <g>


--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
It's a work schedule that's constantly being updated. 40 employees printing
copies on a constant basis confuses things a little bit.

Thanks anyway. I'll consider other options.

Rule number one -
Always date everything. :)
 
Back
Top