• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

Getting rid of message boxes

My program opens up an Excel spreadsheet to read in data.  However, the spreadsheet that it opens contains links to other data sources.  So when it opens it, it always gives a box that asks if I want to update the linked information and I must select yes or no.  Is there a way to have my program always select No, so it doesn't hang up on this prompt?  Thanks!
0
katiep23
Asked:
katiep23
  • 2
1 Solution
 
EDDYKTCommented:
How do you open the file

ie
XlApp.Workbooks.Open FileName:=yourfilename, UpdateLinks:=0
0
 
EDDYKTCommented:
Also try


where XlApp is Excel.Application

XlApp.Interactive = False
XlApp.Application.DisplayAlerts = False
XlApp.Workbooks.Open FileName:=yourfilename, UpdateLinks:=0
0
 
katiep23Author Commented:
Found it out myself!  For future reference to anybody, the second field in xlApp.Workbooks.Open(sPath, False, True) can be used to turn off updating links!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now