Solved

Getting rid of message boxes

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 75
Prevent checkbox click event occur while editing it in vb6 8 57
Help me. 3 60
Error with a code discussed on this page 5 32
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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

828 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