I was looking for a solution to the following problem, but did not find anything useful: I have an excel sheet with data connection to the csv series. Unfortunately, excel really saves the connection as absolute paths. Ideally, I could set the path as relative paths, but I would agree to a macro that will allow the user to update connections depending on thisworkbook.path before first use.
The project is located in the d: \ project folder with the excel sheet in d: \ project \ excel and csv in d: \ project \ results. If I send the project as a zip to some user and it decompresses into c: \ my documents \ project, he will have to connect 10 or so csv.
My general idea would be to write a macro line by line (no real code, since I am new to vba, and if I knew the code, I would not ask)
filepath = thisworkbook.path cons = thisworkbook.connections for each cons filename = cons.filename newpath = filepath & filename end for
source share