Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / June 2007

Tip: Looking for answers? Try searching our database.

How to confirm the open dialogue box by using macro coding?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 13 Jun 2007 04:05 GMT
Does anyone have any suggestions on macro coding on following situation?

Workbooks.Open Filename:="E:\1.xls", UpdateLinks:=3

When macro coding open the file 1.xls, it will update the links from the
data.xls.
In case, if the data.xls file is being connected or retrieved data by other
application, then the link for 1.xls file cannot be updated and a open
dialogue box pop up for file selection.  Does anyone have any suggestions on
how to confirm the open dialogue box by using macro coding, which tries to
make a connection on every 3 seconds until a good connection is being made
for updating the data from data.xls ?

Does anyone have any suggestions?
Thank in advance for any suggestions
Eric
Barb Reinhardt - 13 Jun 2007 11:09 GMT
I wonder if using

Application.DisplayAlerts = False would work

You'd need to add

Application.DisplayAlerts = TRUE at the end

> Does anyone have any suggestions on macro coding on following situation?
>
[quoted text clipped - 12 lines]
> Thank in advance for any suggestions
> Eric
Eric - 13 Jun 2007 12:06 GMT
Thank you for your suggestions

If I add this statement, how should I add it?
I have 20 files to be opened one by one, I show 2 examples as below, which
one should I choose to add this statement?
Do you have any suggestions?
Thank for any suggestions
Eric

[Case 1]
Sub OpenFile()
Application.DisplayAlerts = False

Workbooks.Open Filename:="E:\1.xls", UpdateLinks:=3
Workbooks.Open Filename:="E:\2.xls", UpdateLinks:=3
...
End Sub

[Case 2]
Sub OpenFile()
Workbooks.Open Filename:="E:\1.xls", UpdateLinks:=3
Application.DisplayAlerts = False

Workbooks.Open Filename:="E:\2.xls", UpdateLinks:=3
Application.DisplayAlerts = False
...
End Sub

> I wonder if using
>
[quoted text clipped - 20 lines]
> > Thank in advance for any suggestions
> > Eric
Barb Reinhardt - 13 Jun 2007 12:54 GMT
I'd try it with Case 1.  

> Thank you for your suggestions
>
[quoted text clipped - 48 lines]
> > > Thank in advance for any suggestions
> > > Eric
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.