View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
kiat kiat is offline
external usenet poster
 
Posts: 34
Default Enable/Disable Macros

I'm not the authority on Excel but the only way to disable the dialog box is
to set the security level to low under Tools/Macro/Security or
Tools/Options/Security for Excel XP.

If that's not good enough, here are a couple of my ideas:
- encrypt the workbook and decrypt if authenticaticated
- hide the sheets and password protect the workbook, unprotect and show
sheets if authenticated
- use xla and move the sheets there, copy the sheets to a dummy workbook if
authenticated

....kiat

"Joseph" wrote in message
...
Can anyone tell me if there is any way to bypass the
dialog box that requests whether we want to "Enable
Macros" or "Disable Macros", everytime an excel file with
a macro is opened and force the macro to be executed ...

The reason I want this is, Ive written a macro such that
whenever a user opens a file, the macro would ask for a
login Id and a password. If the user enters both these
correctly, he/she would be able to access the data stored
in the file, else the file would close. There is also
another file which contains the list of valid login Ids
and their corresponding passwords from which we validate
the Id and password that the user enters.

Now if the user chooses "Disable Macros", the whole
concept of login ID and password would not work.

Unfortunately the simple idea of protecting the file with
a password is not feasible as the fundamental requirement
is that different users must be able to login using their
own passwords ...

Pls help !!!!