View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
filo666 filo666 is offline
external usenet poster
 
Posts: 265
Default Disabling macros is not an option!

Hi jim, you remember me (your student¡¡¡¡)

Also could be a good idea Hide all the toolbars and just leave a button with
the print caption in it (an its respective macro of print)

Application.CommandBars("").Enabled = false
Application.CommandBars("format").Enabled = false
Application.CommandBars("form").Enabled = false
Application.CommandBars("chart").Enabled = false
Application.commandbars("Worksheet Menu Bar").enabled=false

remember to put this code in your workbook module

and be shure to create a macro to enable all your menus with a shortcut
application.commandbars("Worksheet Menu Bar").enabled=true 'etc etc.

also I want your opinion jim
"Jim Thomlinson" wrote:

A possible solution might be to set a flag on a sheet which is very hidden.
The user can not get to the very hidden sheet (providing the project is
password protected) so you can control how often a sheet can be printed. You
will probably want to use the before print event to check the very hidden
sheet to determine if the sheet can be printed...

HTH

"Paul Wagstaff" wrote:

Hi folks

Office 97 & NT4

I've been handed a bit of a poisened chalice & like a fool I've taken a
sip...so here's the problem:

Esentially I need to prohibit printing a file unless a small number of
fields are completed. This was originally done in MS Word, but nothing stops
the users from choosing 'Disable Macros' and printing out as many copies as
they like.

I've come across XML macros that cannot be disabled, so I think Excel is my
only choice (yes?). What I'd like to do then is create a spreadsheet that
contains some text fields, which are validated and upon completion, prompt
the user to print. I can handle the validation & the final msgbox "print
now?" etc, but am completely stumped re. creating code from previous
versions of Excel.

Can anyone help me or suggest an alternative way to solve this problem? I
don't mind how it's done as long as users can't print a (partially or
totally) incomplete form - that's the nub of the issue

Ideally I'd like to use Word, and not use UserForms, but beggars can't be
choosers.

Thanks,
Paul