Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Halt - prevents reset of the AutomationSecurity level
Hi,
Starting with a copy of the sample from the help system, I modified it slightly as you can see below. I find that not only is the code in an unsigned project prevented from running (As intended), but all code, even in the project 'controlling' the open, is immediately halted. This prevents the reset of the AutomationSecurity level. 'MODIFIED FROM VBA HELP SAMPLE Sub Security() 'TEST WITH SECURITY DG SET TO HIGH Dim secAuto As MsoAutomationSecurity secAuto = Application.AutomationSecurity 'MODIFIED FROM FORCEDISABLE TO ByUI Application.AutomationSecurity = msoAutomationSecurityByUI 'MODIFIED THIS LINE Application.Dialogs(xlDialogOpen).Show 'CODE HALTS, & NEVER GETS TO NEXT LINE 'IF ANY FILES OPENED HAVE CODE 'PREVENTED FROM RUNNING BY THE 'MACRO SECURITY Application.AutomationSecurity = secAuto End Sub Does anyone know a better way to do this? Best Regards, Walt Weber |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code for App level event (not firing) | Excel Programming | |||
Code: Using Excel Application level Events | Excel Programming | |||
Reset Security Level with VBA? | Excel Programming | |||
Code to halt a macro | Excel Programming |