![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 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?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
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 |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
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). |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|