+ Reply to Thread
Results 1 to 3 of 3

Deleting document from pat

  1. #1
    Registered User
    Join Date
    06-07-2013
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Deleting document from pat

    I need to know how to delete a spread sheet from a folder (using my macro).

    I have a macro/vba that takes data from spread sheets that are sent to me by email. The spread sheets are saved an "in process" folder. Once I run my macro (and the data is extracted from the spreadsheets and copied onto my main database), the macro moves the document to a "completed" file. How do I make my macro delete the file in my "in process" folder?

    Thanks!!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Deleting document from pat

    You need to use the unfortunately named Kill (Pathname) statement to delete. Alternatively use the Name path1 as Path2 statement to move the file as opposed to copying it.
    Martin

  3. #3
    Registered User
    Join Date
    06-07-2013
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Deleting document from pat

    I'll give it a try. Thank you Pat.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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