Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Enable/Disable Macros

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 !!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Enable/Disable Macros

Joseph,

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",

There isn't. If there were, what use would there be to
have a dialog box in the first place.

You've already done some work with the login id's and
passwords, so your familiar with writing VBA code.
What you need to do is make the workbook unusable
if macros are disabled. One way to do this would be
to make all sheets except one very hidden when the user saves
the workbook. On that sheet should be a warning that
macros need to be enabled for the workbook to function.

Search Google for "Force Macros" and you'll come up with
a lot of threads and code to do this.

John

"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 !!!!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Enable/Disable Macros

In a word..... No.

Is there any way you can use standard NT file permissions to restrict
access to the actual file itself?

Another option would be to certify your macros and make sure that all
of the users' computers are set to trust macros signed by you. Then
that prompt will not appear. Not the most secure way to do things
since they can untrust you as well....

Random

On Sat, 23 Aug 2003 05:44:10 -0700, "Joseph"
wrote:

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 !!!!


  #4   Report Post  
Posted to microsoft.public.excel.programming
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 !!!!



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
Enable/Disable Macros Pop-Up juamig Excel Discussion (Misc queries) 1 April 9th 10 06:29 PM
Disable/Enable Macros Message box in Excel2007 Vignesh Excel Discussion (Misc queries) 0 February 6th 08 09:00 AM
Bypassing ENABLE/DISABLE MACROS message Excel4u Excel Discussion (Misc queries) 1 December 7th 05 04:05 PM
Enable/Disable macros Adam Excel Discussion (Misc queries) 2 March 11th 05 10:29 AM
Enable/Disable Macros Ben Schaum Excel Discussion (Misc queries) 1 January 21st 05 03:42 PM


All times are GMT +1. The time now is 04:08 PM.

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

About Us

"It's about Microsoft Excel"