message when activating OLE object

G

Guest

I have added the help file to my template as a PDF OLE Object which is
displayed by calling the simple procedure executing the following statement:

Worksheets("HelpSheet").OLEObjects("HelpFile").Activate

On execution of the macro the following warning statement is displayed:

You are about to activate an OLE object that may contain viruses or may
otherwise be harmful to your computer. You may want to verify that this
object comes from a trustworthy source before you continue
Do you want to continue ?

Is it any way to skip this warning message and open the PDF file ?

Thanks for help.
 
G

Guest

Yes it does. I have added two lines

Application.DisplayAlerts=False

on the begining of my sub, and

Application.DisplayAlerts=True

on the end of my sub.

Thanks for help.

Tony
 

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