Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get Around Linked File Message 2

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
0
0
GB
Dear All,

I am using the coding below to open an Excel file that is linked, how can I get around the message box, I dont want the linked data box to appear when opening the file in VBA as this requires input from the user, I want the file to open and always select yes to update,

Coding currently testing

Sub test()

pathname = [b2].Value
Application.EnableEvents = True
Application.DisplayAlerts = False

Workbooks.Open Filename:=pathname
Application.EnableEvents = True

End Sub

non of the above seems to get rid of the message box, I have tried enableevents both ways (false and true) and it don't want to play.

any help greatly appreciated.
 
Dear All,

I have just found out how to do it,

Workbooks.Open Filename:=pathname, updatelinks:=3

0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external

hope this is useful someone else

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top