Solved

Getting rid of message boxes

Posted on 2004-10-20
3
174 Views
Last Modified: 2010-08-05
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
Comment
Question by:katiep23
  • 2
3 Comments
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12360654
How do you open the file

ie
XlApp.Workbooks.Open FileName:=yourfilename, UpdateLinks:=0
0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 100 total points
ID: 12360665
Also try


where XlApp is Excel.Application

XlApp.Interactive = False
XlApp.Application.DisplayAlerts = False
XlApp.Workbooks.Open FileName:=yourfilename, UpdateLinks:=0
0
 

Author Comment

by:katiep23
ID: 12360683
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now