I have a file where I am getting some external data from another excel file by using the Microsoft Query in Excel. There is no problem retrieving the data which I am doing through an ActiveX control button where part of the sub is ThisWorkbook.RefreshAll.

My issue is that when a user clicks the button to update (ThisWorkbook.RefreshAll) it causes the file that is being queried to open but this only happens if I have the file with the table of data open. If I don’t have it open, everything runs fine and the file with the table of data does not open. Any thoughts as to why this would happen?

Thanks in advance for your help!