We have an excel file on the server which has a macro that opens up other excel files and copies the data into the excel file.
Users of the macro file run the macro either on the server by remote desktop or via accessing a particular folder on their PC through shared drive.
Thus the path of the file needs to be dynamic based on where it is run from.
For example
If the file is opened from the PC then it should be
or else if the file is opened directly on the server then
Can anyone please help me understand on how this could be done in the VBA code itself
Bookmarks