I have a macro written to copy data from a different workbook and paste transpose it to the one i have open.
Is there a way to change the reference to the file i want to copy data from to change based on the name of the file i have open or the working directory im in.
all the files are name by a 5 digit number then GA then 001
so the name would look like this and the # would change based on the project.
#####GA001.xlsx name of file i get the data
#####GG001.xlsm name of file the data is being pasted
i guess to explain it better I want the marco to look at the name of the #####GG001.xlsm file that the marco runs in to place the appropiate numbers in the #'s.
is this possible? the files will be located in the same folder. I dont know if it can pick up the directory im in
here is the code
This part of the Code is what i want to change the two files are located in the same folder the only thing that would change from project to project would be the first 5 digit number of the file name. the location path will change from project to project. I want to add the marco to the template file so for each project I dont have to go into the code and change the path. I think theres a way to pick up the working directory of the file and then search look for a file named like this #####GA001.xlsx.
If you need more explaination i can try to explain it better.
Bookmarks