Here is code I use in an application I run almost daily with no issues.
Application.AutomationSecurity = msoAutomationSecurityLow
On Error Resume Next
Set oWB = Workbooks.Open(newPath, UpdateLinks:=False, _
ReadOnly:=True)
On Error GoTo 0
Application.AutomationSecurity = msoAutomationSecurityByUI
Are you doing things in Excel and another application and it shows up?
--
HTH,
Barb Reinhardt
If this post was helpful to you, please click YES below.
"prafulla" wrote:
> Hi,
> Actually I tried by setting pplication.AutomationSecurity
> =msoAutomationSecurityLow and msoAutomationSecurityForceDisable.But
> it still does not works.
>
> The warning still pop ups while opening the office file(word,excel and
> power point) and stops the execution flow of the program.
>
> I want these warning dialog to be suppressed such that that normal
> flow of the program is not hindered.
>
> Thank you.
>
> Regards,
> Prafulla
>
|