Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Feb 2001
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    runtime 53 (97 sr2)

    I have attached the code that is giving me problems. It works perfectly until it gets to the Kill statement, then it gives me a runtime error 53. I don't understand it. The filecopy works fine????
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: runtime 53 (97 sr2)

    I don't understand your code. You create a text file whose name is the value of the variable FILEPATH, and whose path is stored in the variable PATH, but then you try to copy and delete a file whose path is stored in the variable DROPFOLDERFILEPATH and whose name is stored in tempfilename. There doesn't seem to be any relation between these.

  3. #3
    Lounger
    Join Date
    Feb 2001
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: runtime 53 (97 sr2)

    I added an explanation of the top of the code. This is just one module out of 10. The Kill statement is the only problem.
    Attached Files Attached Files

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: runtime 53 (97 sr2)

    You could replace the two lines

    FileCopy DROPFOLDERFILEPATH & tempfilename, ArchiveFilePath & day(Date) & "_" & Year(Date) & "_" & tempfilename
    Kill DROPFOLDERFILEPATH & tempfilename

    with the single line

    Name DROPFOLDERFILEPATH & tempfilename As ArchiveFilePath & day(Date) & "_" & Year(Date) & "_" & tempfilename

    The Name ... As ... instruction renames a file; if you specify a different path for the target, you effectively move the file.

Posting Permissions

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