I have an Excel workbook that references a custom add-in located on a users C drive. However, if a user opens this workbook from a shared network drive (W drive for example) instead, the workbook then looks for the add-in on the W drive and can't locate it, resulting in a bad path name in the formula bar and a #NAME? error in the cell.
Ex:
='W:\Path\Path\AddIn.xla'!ABCFunction($D$9,$B$5,$B$6,$B$7,"hours", 0)
...where 'W:\Path\Path\AddIn.xla'! needs to be removed for the function to work properly.
This can be fixed by doing a simple find/replace of the offending link in the formula bar, but I'm looking for a way to automate this process. Because there are multiple shared network drives this workbook might be opened from, I can't use a simple ChangeLink function because the path will change depending on which drive it is opened from.
I need a way to either find any characters in between the = and ABCFunction and delete them, or a way to find any link's ending in .xla and delete.
Any help would be greatly appreciated.
Thanks!
Bookmarks