So i am trying to make a macro on a workbook(WB1). It has cells that link to other Workbooks (WB2-WB10). These (WB2-WB10) have two sheets that are linked to an access point which contains "1.xls" and "2.xls" (sheet1 linked to 1.xls, and sheet2 to 2.xls). I have tried a macro that will open the file, update links then save and close. Also tried the same but refreshall instead of update links, then again with a marco that does both, and yet everytime it runs, it goes through all the workbooks one by one, opens them, calculates, saves and closes, and yet when i go back to check, nothing is updated.
I have checked the access data and it is updated, and if i go into each workbook and manually click refresh it does indeed refresh. I am at a loss and dont know what i am doing wrong.
here is the code.
Sub GetFile()
Workbooks.Open "blahblah.xlsx", UpdateLinks:=1
ActiveWorkbook.RefreshAll
ActiveWorkbook.Close SaveChanges:=True
Any help would be greatly appreciated.
Thank You,
Sean
I have checked the access data and it is updated, and if i go into each workbook and manually click refresh it does indeed refresh. I am at a loss and dont know what i am doing wrong.
here is the code.
Sub GetFile()
Workbooks.Open "blahblah.xlsx", UpdateLinks:=1
ActiveWorkbook.RefreshAll
ActiveWorkbook.Close SaveChanges:=True
Any help would be greatly appreciated.
Thank You,
Sean