How to enable Macro automatically

U

ub

Hi
I have some macros in my excell sheet
Can i write a code in VB editor that Workbook open it enables macros
automatically and system does not ask question to the user.

Regards
 
D

Dave Peterson

No.

Allowing macros to run is a security issue. If your macro could allow itself to
run, it wouldn't provide any security to the user.
 
B

bpeltzer

A compromise solution is to locate the selfcert.exe file in your Office
installation. Use that to create a 'digitial certificate.' Then in the VB
Editor, Tools > Digital Signature, choose your certificate and OK.
Then you (or other users to whom to send the file with the macro) can
indicate that you are a trusted publisher, which will get around the prompt.
 
G

Gord Dibben

SelfCert certificates are good only for the computer on which they were created.

You can export the certificate as a file but won't do you any good because you
cannot export the private key to another computer.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top