• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • 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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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