Results 1 to 5 of 5

Delete excel files in a given folder

Threaded View

adrianrff Delete excel files in a given... 08-21-2013, 02:02 PM
patel45 Re: Delete excel files in a... 08-21-2013, 02:31 PM
adrianrff Re: Delete excel files in a... 08-21-2013, 02:57 PM
HaHoBe Re: Delete excel files in a... 08-21-2013, 03:03 PM
adrianrff Re: Delete excel files in a... 08-21-2013, 03:18 PM
  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Caracas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Delete excel files in a given folder

    Hi,

    I have macro that creates a new workbook based on a sample sheet within the workbook containing the macro. The macro names the file with a correlative number (based on the value of a cell that increases by one everytime a new workbook is created). So, for example, the first file created will have the name "name 1.xlsx", the second "name 2.xlsx", the third, "name 3.xlsx" and so on.

    I'd like to have a separate macro that deletes the last workbook created so that if the user made a mistake when creating a file, say file "name 13.xlsx", he could run this macro and have it deleted. I can't figure out how to tell the macro that the name of the file is "name (cell value).xlsx". "Cell value" being the correlative number of the last workbook created. Is this even possible?

    Thanks in advanced
    Last edited by adrianrff; 08-21-2013 at 03:24 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to delete csv files in downloads folder
    By prontrad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2009, 06:48 AM
  2. move files to another folder delete original
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-09-2009, 02:50 AM
  3. [SOLVED] Delete .csv files in a folder
    By John in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2006, 02:10 PM
  4. Delete files within a folder
    By tarzan538 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2006, 09:25 PM
  5. [SOLVED] Delete All Files in a folder
    By Michael Smith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2005, 01:05 PM

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