+ Reply to Thread
Results 1 to 12 of 12

FSO.MoveFile "Invalid Procedure call or argument" Error

  1. #1
    Registered User
    Join Date
    08-19-2020
    Location
    CALIFORNIA, USA
    MS-Off Ver
    2010
    Posts
    4

    FSO.MoveFile "Invalid Procedure call or argument" Error

    Hello,
    The following code returns an "Invalid Procedure call or argument" Error.
    In the instruction: StilesFSO.CopyFile Source:=ListerFolder, Destination:=ToSalvagniniFolder;
    if I disable this line it actually debug.prints the accurate information.
    Can someone help to figure out the issue with it?


    Please Login or Register  to view this content.
    Last edited by ZIQUI; 10-22-2020 at 11:17 AM. Reason: MISSING TAGS

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  3. #3
    Registered User
    Join Date
    08-19-2020
    Location
    CALIFORNIA, USA
    MS-Off Ver
    2010
    Posts
    4

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Thank you for replying, and sorry for the inconvenience. I just put the tags in.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Sorry, you seem to have added them manually ( in the wrong order). Select your code and click the # button as indicated in my post

  5. #5
    Registered User
    Join Date
    08-19-2020
    Location
    CALIFORNIA, USA
    MS-Off Ver
    2010
    Posts
    4

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Hi, I just fixed. Hopefully is okay now.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    @Pepe Le Mokko: the # icon is not currently present on the menu bar.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    You should just pass the folder paths as strings to the CopyFile method.
    Rory

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Quote Originally Posted by TMS View Post
    @Pepe Le Mokko: the # icon is not currently present on the menu bar.
    In the Advanced window it is

  9. #9
    Registered User
    Join Date
    08-19-2020
    Location
    CALIFORNIA, USA
    MS-Off Ver
    2010
    Posts
    4

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    I did as you said, but still not getting the same error.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Quote Originally Posted by Pepe Le Mokko View Post
    In the Advanced window it is
    You know that and I know that. This is the OP's first thread, so I’m guessing he may not know it.

  11. #11
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Quote Originally Posted by TMS View Post
    You know that and I know that. This is the OP's first thread, so I’m guessing he may not know it.
    BTA maybe he does, as the tags were added...

  12. #12
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: FSO.MoveFile "Invalid Procedure call or argument" Error

    Quote Originally Posted by ZIQUI View Post
    I did as you said, but still not getting the same error.
    I assume you mean you are still getting the error, in which case I'd check your variables - perhaps one of the paths is blank.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Recorded Macro "Invalid procedure or call argument" Error
    By lilit2222 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2020, 05:04 AM
  2. I am getting this error by below macro "Invalid procedure call arguement" please help
    By shoaibaligwl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2017, 09:39 AM
  3. help with "invalid procedure call or argument" error.
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-02-2017, 11:41 AM
  4. [SOLVED] run time error '5" invalid procedure call or argument
    By jay11 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-12-2015, 12:29 PM
  5. Run-time Error 5 "Invalid Procedure Call or Argument"
    By dinakar.yadav in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2014, 09:22 AM
  6. WritetoSheet causing "invalid procedure call or argument"
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2013, 03:46 PM
  7. "Invalid procedure call or argument" error when creating Pivot table
    By Kaigi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2009, 06:02 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1