How to enable Macro automatically

  • Thread starter Thread starter ub
  • Start date Start date
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
 
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.
 
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.
 
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
 
Back
Top