Home |
Search |
Today's Posts |
#1
|
|||
|
|||
An 'Umbrella' for UNsigned VBA projects?
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/assistan...rticles/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 |
#2
|
|||
|
|||
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 -----Original Message----- 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/assistan...articles/otell d 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Planning & Tracking Home-work projects for kids. | Excel Discussion (Misc queries) | |||
looking for template to track hours on projects for employees | Excel Discussion (Misc queries) | |||
how do I set up cashflow budgets for different projects | New Users to Excel | |||
How do I use the To-Do List for Projects Template in Excel? | Excel Discussion (Misc queries) | |||
I need a template for at a glance viewing 2005 projects for staff. | Charts and Charting in Excel |