macro cannot be found

ccalder

New Member
Joined
Apr 3, 2002
Messages
2
I copied a directory of Excel workbooks from a network drive to my C: drive. Now when I execute a procedure from a workbook on my C: drive that opens another workbook, then calls a procedure in that workbook (using application.run 'fully qualified procname') I get a runtime error '1004': the macro 'fully qualified procname' cannot be found. This works fine if I call the procedure from the workbook on my network drive (where it was created). Any ideas on why Excel can't find the macros in the moved workbook?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Make sure you copied the macro into a standard module. Worksheets and workbooks are classes.
Make sure the word Private does not list before Sub
Tom
 
Upvote 0
Thanks, but I've checked the copied workbook and it has the module with the procedure in it and it's not private. I even exported, deleted, then imported the modules in the new workbook. All to no avail. The only differences in the two workbooks are:
1)physical location and 2) the value for the path variable used to construct the workbook name for the open (which works) and the application.run statement (which gives me the error).
 
Upvote 0

Forum statistics

Threads
1,214,608
Messages
6,120,500
Members
448,968
Latest member
screechyboy79

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top