+ Reply to Thread
Results 1 to 4 of 4

Run Macro or delete file check

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    65

    Run Macro or delete file check

    Is there a way to tell a macro to check cell A1 and if it finds any of the following words, delete the file. If it doesn't, run the macro.

    If you find this in cell A1, delete the file:
    Split
    19
    2000
    2001
    2002
    2003
    2004
    2005
    2006
    2007

    Thanks,
    Benny

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Run Macro or delete file check

    Hello Sweepin,

    Which file is to be deleted?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-26-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    65

    Re: Run Macro or delete file check

    I was thinking for a macro that

    1 - Open file
    2 - look for keywords in cell a1
    3 - if keywords, delete the file you just opened
    4- if no keywords, open next file.

  4. #4
    Registered User
    Join Date
    05-26-2013
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    65

    Re: Run Macro or delete file check

    Or, rather, can I make something that checks cell A1 for the keywords and if it's there marks the file as bad or something and then I can just sort and delete in the folder?

+ 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. Need Help to Open File from assigned Folder and Check one condition , Delete and Save.
    By Naveed Raza in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2013, 02:23 PM
  2. Macro to check for file modification and display a pop-up or reload the client file.
    By Askander in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-02-2011, 09:26 AM
  3. [SOLVED] Macro to delete sheets and saves remaining file does not properly delete module
    By pherrero in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2005, 08:12 PM
  4. Replies: 0
    Last Post: 06-21-2005, 01:05 PM
  5. [SOLVED] Re: Macro to delete sheets and saves remaining file does not properly delete module
    By pherrero in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-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