An 'Umbrella' for UNsigned VBA projects?

W

Walt Weber

Hi,

To simplify and demonstrate an observation (Adjust for
word wrap please):

1) Create a new workbook named 'Book1.xls' and enter the
following 'Thisworkbook' level event :
Private Sub Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range)
Workbooks.Open Filename:=ThisWorkbook.Path & "\Book2"
End Sub
2) Digitally sign the Book1.xls VBA project and save and
close the file.
3) Create a new workbook named 'Book2.xls' and enter the
following 'Thisworkbook' level events :
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Book2 Project Closing and VBASigned = " &
ThisWorkbook.VBASigned
End Sub
Private Sub Workbook_Open()
MsgBox "Book2 Project Opening and VBASigned = " &
ThisWorkbook.VBASigned
End Sub
4) Do NOT sign the Book2.xls project, but save and close
the file (Same directory).

With Macro Security set to 'High', opening Book2.xls will
not trigger its events since the VBA code is disabled.
However, if instead Book1.xls is opened and the selection
is changed

by the user, Book2.xls will be opened with its VBA code
fully functional.

This implies the signed control file creates an umbrella
that shelters, from signature checking, those files the
control file opens and closes.

On reading through the following, I find no mention of
this behavior:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnoxpta/html/odc_dsvba.asp
http://support.microsoft.com/default.aspx?scid=kb;en-
us;Q288985
http://support.microsoft.com/?KBID=206637
http://support.microsoft.com/?KBID=217221
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnimo00/html/combat.asp
http://msdn.microsoft.com/library/en-
us/odeopg/html/deovrsigningvbaproject.asp
http://support.microsoft.com/default.aspx?scid=kb;en-
us;Q329228
http://office.microsoft.com/assistance/2002/articles/otelld
igitalcertiftrustworthy.aspx

Can anyone point me to an explanation of this feature in
the Microsoft documentation? I'd like to be sure I fully
understand it.

Best Regards,
Walt
 
W

Walt Weber

Hi,

For anyone interested in this subject, look up the
AutomationSecurity property in the Help system for Excel
2002 or 2003. I find the following:

"This property is automatically set to
msoAutomationSecurityLow when the application is started."

Apparently the AutomationSecurity property was not
available in Excel 2000. But, as I've been able to
demonstrate, Excel 2000 functions as though the macro
security is set permanently to LOW when opening files via
Workbooks.Open Filename:="PathAndFileName.xls".

Best Regards,
Walt
 

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