I have an excel file that uses equations to update itself according to a different excel file in another folder.

ie: When a cell in file 1 column A matches a cell in file 2 column A, the corresponding rows in file 1 are set to equal that of file 2.

This has been working very well so far, except that occasionally the first file will stop updating itself. The problem seems to be that the XREF file path has changed. It appears to reference the same document, but instead of just saying the file name in the XREF (which is how it was written originally), it now reads the entire filepath (including all folders). All I have to do to fix this is redo the XREF, but I don't want to have to continually check for that changing. What causes this XREF change? Is there a way to prevent it?