Disable Link Alert

O

Otto Moehrbach

Excel XP & Win XP
In VBA, I'm opening up some 5 files that have links to each other as
well as to 2 already open files. The files open OK but I still get that
"This file has links....." query box even though I set the DisplayAlerts to
False. How do I disable that query? Thanks for your help. The code is:
Do While TheFile <> ""
Application.DisplayAlerts = False
Workbooks.Open Filename:=MyPath & "\" & TheFile
TheFile = Dir
Application.DisplayAlerts = True
Loop
 
O

Otto Moehrbach

Oops. The 2 DisplayAlert lines should go outside of the Do loop. But this
doesn't stop the query so I still need help. Otto
Application.DisplayAlerts = False
Do While TheFile <> ""
Workbooks.Open Filename:=MyPath & "\" & TheFile
TheFile = Dir
Loop
Application.DisplayAlerts = True
 

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