View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
scott scott is offline
external usenet poster
 
Posts: 577
Default hide/protext auto_open code so user can't prevent it from runn

Thanks, Gord.

"Gord Dibben" wrote:

Scott

Frtom help on "about digital signatures".


Microsoft Office 2003 uses Microsoft Authenticode technology to enable you to
digitally sign a file or a macro project by using a digital certificate. The
certificate used to create this signature confirms that the macro or document
originated from the signer, and the signature confirms that it has not been
altered. When you set the macro security level, you can run macros based on
whether they are digitally signed by a developer on your list of trusted
sources.

Where to get the digital certificates

You can obtain a digital certificate from a commercial certification authority,
such as VeriSign, Inc., or from your internal security administrator or
Information Technology (IT) professional. Or, you can create a digital signature
yourself using the Selfcert.exe tool.

Note Because a digital certificate you create yourself isn't issued by a formal
certification authority, macro projects signed by using such a certificate are
referred to as self-signed projects. Certificates you create yourself are
considered unauthenticated and will generate a warning in the Security Warning
box if the security level is set to High or Medium. Microsoft Office will only
trust a self-signed certificate on a computer that has the private key for that
certificate available (generally only the computer that actually created the
certificate, unless the private key is shared with other computers).


Gord Dibben MS Excel MVP

On Thu, 17 May 2007 20:41:00 -0700, Scott
wrote:

I've done a fair amount of Visio VBA but very little with Excel and need
assistance.

I've written an Excel auto_open() macro that works fine. Among other things
it checks whether the user has a license to perform certain functions. I
would like the code to be compiled/ protected/ trusted so the user can't
circumvent it by setting macro security to high.

I've played with an .xla add-in but the auto_open() code only executes when
the add-in is loaded or unloaded. I know I can load or unload it from code
but I can't put the calling code in my xls/xlt because I would have the same
problem -- the user could set macro security to high and prevent the call to
the xla.

I'm sure my need isn't unique -- code that always runs when an xlt/xls is
opened and that can't be disabled by the user. Can someone point me in the
right direction?

Thanks,
Scott