+ Reply to Thread
Results 1 to 4 of 4

Adding Sheet Invalidates Digital Signature

  1. #1
    Simon
    Guest

    Adding Sheet Invalidates Digital Signature

    (see various posts on this subject in this group - all without any fix)

    Simply put, any macro in a signed excel project that adds or deletes a sheet
    will invalidate the digital signature causing macros to be disabled next time
    the workbook is loaded. Thsi seems to apply to Office XP and 2003 at least.

    It appears that the digital signature includes not only the VBA code
    modules, classes, etc. but also the sheets collection! This is particularly
    annoying as the sheets I'm adding (copy from existing hidden 'template'
    sheet) don't contain any code and this bug/feature isn't documented anywhere
    I could find.
    Obviously, changing the contents of a sheet is possible without invalidating
    the signature. How is adding a sheet any different? Maybe the hashing
    algorithm assumes that each sheet always has a code segment and always
    includes it - even though it is empty? Is there some way I can ensure that my
    template sheet is code-free and therefore always excluded from the hashing?
    I've tried a workbook cleaning utility but that didn't help.

    Any suggestions (that don't involve COM or add-ins) or even a patch to Excel
    from Microsoft would be very welcome.

  2. #2
    Mexage
    Guest

    RE: Adding Sheet Invalidates Digital Signature

    Simon:

    I believe that it has to do with the fact that every sheet has a "module"
    and can have code added to it. Do you absolutely need to add an undefinite
    number of sheets? Because if there's a maximum of sheets you will be creating
    you could just hide them before you sign your macros. Then instead of
    creating new sheets, you will unhide them.

    Another way of doing it could be to design your macros to work by creating
    new workbooks. That way you won't need to modify the original.

    That's all my advice Simon, I hope that helps.

    Sincerely,
    G.Morales
    "Simon" wrote:

    > (see various posts on this subject in this group - all without any fix)
    >
    > Simply put, any macro in a signed excel project that adds or deletes a sheet
    > will invalidate the digital signature causing macros to be disabled next time
    > the workbook is loaded. Thsi seems to apply to Office XP and 2003 at least.
    >
    > It appears that the digital signature includes not only the VBA code
    > modules, classes, etc. but also the sheets collection! This is particularly
    > annoying as the sheets I'm adding (copy from existing hidden 'template'
    > sheet) don't contain any code and this bug/feature isn't documented anywhere
    > I could find.
    > Obviously, changing the contents of a sheet is possible without invalidating
    > the signature. How is adding a sheet any different? Maybe the hashing
    > algorithm assumes that each sheet always has a code segment and always
    > includes it - even though it is empty? Is there some way I can ensure that my
    > template sheet is code-free and therefore always excluded from the hashing?
    > I've tried a workbook cleaning utility but that didn't help.
    >
    > Any suggestions (that don't involve COM or add-ins) or even a patch to Excel
    > from Microsoft would be very welcome.


  3. #3
    Stuart
    Guest

    Re: Adding Sheet Invalidates Digital Signature

    Would it work if the workbook containing the code was a template, and the
    user simply opened a copy?
    Don't know......just a thought.

    Regards.

    "Simon" <Simon@discussions.microsoft.com> wrote in message
    news:2889B383-12DF-4FCE-A6DF-6E1D56D6A4C4@microsoft.com...
    > (see various posts on this subject in this group - all without any fix)
    >
    > Simply put, any macro in a signed excel project that adds or deletes a
    > sheet
    > will invalidate the digital signature causing macros to be disabled next
    > time
    > the workbook is loaded. Thsi seems to apply to Office XP and 2003 at
    > least.
    >
    > It appears that the digital signature includes not only the VBA code
    > modules, classes, etc. but also the sheets collection! This is
    > particularly
    > annoying as the sheets I'm adding (copy from existing hidden 'template'
    > sheet) don't contain any code and this bug/feature isn't documented
    > anywhere
    > I could find.
    > Obviously, changing the contents of a sheet is possible without
    > invalidating
    > the signature. How is adding a sheet any different? Maybe the hashing
    > algorithm assumes that each sheet always has a code segment and always
    > includes it - even though it is empty? Is there some way I can ensure that
    > my
    > template sheet is code-free and therefore always excluded from the
    > hashing?
    > I've tried a workbook cleaning utility but that didn't help.
    >
    > Any suggestions (that don't involve COM or add-ins) or even a patch to
    > Excel
    > from Microsoft would be very welcome.




  4. #4
    Walt
    Guest

    RE: Adding Sheet Invalidates Digital Signature

    Hi Simon,

    The only approach I can see that can fit your described requirements at this
    time is to create a separate control file (Signed) to open the working file
    (Not Signed). The control file can include a workbook open event to open
    the working file - taking advantage of the default msoAutomationSecurityLow.

    I agree this is only a work around to a real problem.

    Best Regards,
    Walt Weber


    "Simon" wrote:

    > (see various posts on this subject in this group - all without any fix)
    >
    > Simply put, any macro in a signed excel project that adds or deletes a sheet
    > will invalidate the digital signature causing macros to be disabled next time
    > the workbook is loaded. Thsi seems to apply to Office XP and 2003 at least.
    >
    > It appears that the digital signature includes not only the VBA code
    > modules, classes, etc. but also the sheets collection! This is particularly
    > annoying as the sheets I'm adding (copy from existing hidden 'template'
    > sheet) don't contain any code and this bug/feature isn't documented anywhere
    > I could find.
    > Obviously, changing the contents of a sheet is possible without invalidating
    > the signature. How is adding a sheet any different? Maybe the hashing
    > algorithm assumes that each sheet always has a code segment and always
    > includes it - even though it is empty? Is there some way I can ensure that my
    > template sheet is code-free and therefore always excluded from the hashing?
    > I've tried a workbook cleaning utility but that didn't help.
    >
    > Any suggestions (that don't involve COM or add-ins) or even a patch to Excel
    > from Microsoft would be very welcome.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1