Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2008
    Posts
    1,009
    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 05:11.

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,227
    Thanks
    202
    Thanked 794 Times in 728 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


  4. #3
    5 Star Lounger
    Join Date
    Feb 2008
    Posts
    1,009
    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
  •