RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 788
- Office Version
- 2010
- Platform
- Windows
Hello hello, a non-VBA question for once.
A macro opens a spreadsheet, which is chock full of pre-existing formulas. These formulas USED TO reference a static location on our server that everyone had the same link to.
We've since moved to OneDrive, so everyones file path is now like... "C:\Users\RockandGrohl\Server\DestinationFile\Answer.xlsx"
Therefore, if I change the link in the sheet to the above string, it will only work when I open the file. So if user "Mike" runs the macro, which opens that Answer.xlsx file, the formulas will point towards RockandGrohl's file which is obviously on his PC (but the file does exist on Mike's PC, via OneDrive, just under a different path.
So is it easier to
A) Do a mass find and replace which has a dynamic username?
B) Change the links via VBA using the clever Environ("username") function?
Cheers!
A macro opens a spreadsheet, which is chock full of pre-existing formulas. These formulas USED TO reference a static location on our server that everyone had the same link to.
We've since moved to OneDrive, so everyones file path is now like... "C:\Users\RockandGrohl\Server\DestinationFile\Answer.xlsx"
Therefore, if I change the link in the sheet to the above string, it will only work when I open the file. So if user "Mike" runs the macro, which opens that Answer.xlsx file, the formulas will point towards RockandGrohl's file which is obviously on his PC (but the file does exist on Mike's PC, via OneDrive, just under a different path.
So is it easier to
A) Do a mass find and replace which has a dynamic username?
B) Change the links via VBA using the clever Environ("username") function?
Cheers!