Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default How to confirm the open dialogue box by using macro coding?

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default How to confirm the open dialogue box by using macro coding?

I wonder if using

Application.DisplayAlerts = False would work

You'd need to add

Application.DisplayAlerts = TRUE at the end



"Eric" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default How to confirm the open dialogue box by using macro coding?

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



"Barb Reinhardt" wrote:

I wonder if using

Application.DisplayAlerts = False would work

You'd need to add

Application.DisplayAlerts = TRUE at the end



"Eric" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default How to confirm the open dialogue box by using macro coding?

I'd try it with Case 1.

"Eric" wrote:

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



"Barb Reinhardt" wrote:

I wonder if using

Application.DisplayAlerts = False would work

You'd need to add

Application.DisplayAlerts = TRUE at the end



"Eric" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preview in Open Dialogue Juli Excel Discussion (Misc queries) 4 May 31st 07 09:21 PM
where is confirm conversion at open in Excel 2007? ('03 tools opt sandibeach_2000 Excel Discussion (Misc queries) 0 March 20th 07 02:30 PM
When i open excel on the start dialogue, it does not open. lemon8 Setting up and Configuration of Excel 1 December 14th 05 05:37 AM
Need VBA code for "Open Dialogue" box Brent E Excel Discussion (Misc queries) 2 February 8th 05 04:23 AM
Need VBA assistance for Excel Open Dialogue box Brent E Excel Discussion (Misc queries) 2 February 7th 05 07:41 PM


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"