Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2008
    Posts
    1,023
    Thanks
    63
    Thanked 2 Times in 2 Posts

    Opening up all files in folder and then running Macro in opened workbooks

    I have a macro that opens up several files in one folder and then select the macro Auto_Update () in each of these workbooks

    However, I get a run time error 1004 and the following code is highlighted


    Code:
     Application.Run "'" & fName & "'!Auto_Update"
    I have attached the workbook -Open Parts & Service files.xlsm and well as the workbooks where it is accessing the macro Auto_Update

    Your assistance is resolving this is most appreciated
    Attached Files Attached Files
    Last edited by HowardC; 2014-08-17 at 06:11.

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,480
    Thanks
    211
    Thanked 849 Times in 781 Posts
    Howard,

    See post #5 Here. HTH
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  3. #3
    5 Star Lounger
    Join Date
    Feb 2008
    Posts
    1,023
    Thanks
    63
    Thanked 2 Times in 2 Posts
    Hi RG

    Not sure what to do-have seen your link.

    Have you had a look at my screen shot "run time error 1004-cannot run the macro 'Auto_update!'

    It is only the code below that is causing the problem

    Code:
     Application.Run "'" & fName & "'!Auto_Update"
    It would be appreciated if you could test this and amend my code

Posting Permissions

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