You could certainly do that. Then the user could simply open the
workbook with the Shift key held down and print normally.
Failing that, the user could type CMD-SHIFT-4 to take a picture of
the
window, and print the picture.
An easier macro would be to intercept the Workbook_BeforePrint()
event
(put this in the ThisWorkbook module):
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
End Sub
However, if you actually want to *prevent* printing from XL, you
should
know that there's no way to stop even mildly adept users (e.g.,
anyone
able to find these newsgroups) from bypassing any of XL's internal
protections, including macros.
If a user can open a file, you must assume that he or she has
complete
access to it.
===============================
Thank you for the reply.
I understand that there is no solid way to disable the printing. The
users in my sharing group all share the understanding that our
spreadsheet is not to be printed, but we still wanted to throw in a
"speed bump" to remind everyone not to print... sorta like locking the
car and taking the keys, but we know there's always the slim-jim
option for anyone who really, really wants to get in.
Also, there are a number of folks in my group who will have Windows
versions of XL, so I'm presuming any macros written will be
compatible. 2004 for Mac has that compatibility check feature, and
I've never seen it flag a doc for macro incompatibilities (usually
it's date formats).
Again, thank you for the feedback. Can I bug you for a few extra
details on the solution you offered? I'm a self-taught Excel dabbler,
and although I learn and adapt very quickly, I need a little help when
entering new territory... but not a lot. The macros/visual basic are
not unfamiliar, but they aren't things I've actually grazed into with
scripting yet, either.
Bill Niehausen