<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CUsers%5Cluke%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C04%5Cclip_filelist.xml"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1575817524; mso-list-type:hybrid; mso-list-template-ids:1531376952 -686418760 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;} @list l0:level1 {mso-level-start-at:168; mso-level-number-format:bullet; mso-level-text:-; mso-level-tab-stop:36.0pt; mso-level-number-position:left; text-indent:-18.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--> I have created a spreadsheet containing VBA code that I want to distribute to customers. In order to let me run VBA on clients’ machines, I have bought a digital signature and have signed my file.
<o> </o>
My problem is that the code needs to create new worksheets, but if I save the file after doing so, Excel complains and drops the signature with the error message “You have modified a signed project. You do not have the correct key to sign this project. The signature will be discarded.”
<o> </o>
I think this arises because the new worksheet generates a corresponding new ‘Microsoft Excel Object’ – i.e. Sheetx, and that VBA then considers this amounts to changing the macros and therefore requires them to be re-signed. My question – is this correct and if so, are there any workarounds?
<o> </o>
<o> Thanks</o>
<o></o>
<o>Luke
</o>
<o> </o>
Background information
<o> </o>
<!--[if !supportLists]-->-[FONT="] [/FONT]<!--[endif]-->version : Excel 2003. Upgrading to 2007 is a possibility if it overcomes the problem.
<o> </o>
Other questions
<o> </o>
Having read around the problem, I seem to have two options:- force users to run macro security at low, or modify my code to run as an Excel Addin file. I’ve never had to do either before, so
<o> </o>
<!--[if !supportLists]-->-[FONT="] [/FONT]<!--[endif]-->Can I set a user’s macro security level programmatically?
<!--[if !supportLists]-->-[FONT="] [/FONT]<!--[endif]-->If I went for the add-in approach, what would I lose? My workbook is currently very interactive, with Macros running on some Change and Select events; would that have to go?
<o> </o>
My problem is that the code needs to create new worksheets, but if I save the file after doing so, Excel complains and drops the signature with the error message “You have modified a signed project. You do not have the correct key to sign this project. The signature will be discarded.”
<o> </o>
I think this arises because the new worksheet generates a corresponding new ‘Microsoft Excel Object’ – i.e. Sheetx, and that VBA then considers this amounts to changing the macros and therefore requires them to be re-signed. My question – is this correct and if so, are there any workarounds?
<o> </o>
<o> Thanks</o>
<o></o>
<o>Luke
</o>
<o> </o>
Background information
<o> </o>
<!--[if !supportLists]-->-[FONT="] [/FONT]<!--[endif]-->version : Excel 2003. Upgrading to 2007 is a possibility if it overcomes the problem.
<o> </o>
Other questions
<o> </o>
Having read around the problem, I seem to have two options:- force users to run macro security at low, or modify my code to run as an Excel Addin file. I’ve never had to do either before, so
<o> </o>
<!--[if !supportLists]-->-[FONT="] [/FONT]<!--[endif]-->Can I set a user’s macro security level programmatically?
<!--[if !supportLists]-->-[FONT="] [/FONT]<!--[endif]-->If I went for the add-in approach, what would I lose? My workbook is currently very interactive, with Macros running on some Change and Select events; would that have to go?