Solved

Getting rid of message boxes

Posted on 2004-10-20
3
205 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

713 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