Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: macro cannot be found

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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).

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •