LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code for App level event (not firing) Chris W[_3_] Excel Programming 2 February 28th 05 02:57 AM
Code: Using Excel Application level Events Chris W[_3_] Excel Programming 0 February 27th 05 07:40 PM
Reset Security Level with VBA? JK Excel Programming 6 December 6th 04 04:33 AM
Code to halt a macro floss Excel Programming 1 April 26th 04 08:22 PM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"