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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 09:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com