Hello All,
I’m having some path issues and was wondering if anyone could help.
I have created an Access file called “calcdata.mdb” and an Excel file called “calcdata.xlsm”. I ran the Macro Recorder and was able to create a Macro that will go and get the information that I need from Access. No problems with that at all. Where I encounter problems is when I move these two files from one folder to another. These files are job specific and need to stay with the rest of the job files.
Then, when the Access file is updated, the “Refresh” does not work. It tells me that it can’t find the file.
What I would like to know is what do I have to do to the Macro that will make it look only in the folder that the Excel file is located? (Both the Access file and the Excel file are located in the same folder regardless of what the rest of the tree below it is.)
The original files (blank templates) are located in H:\Engineering Dept\Engineering Documents\Jobs in process\Job Setup\4. Engineering Documents\Calculations\Calculation Storage. Whan a new job enters the department, the “Job Setup” part gets changed to the Job Number. The real “calcdata.mdb” is created by another program and then I want to open the “calcdata.xlsm” and run the macro and have it find the correct Access file.
Here is the code generated by the Macro Recorder. Could someone please tell me what I need to add to make it look in the right place and what I need to change on the “Data Source” & “SourceDataFile =” lines?
Forum.txt
Bookmarks