+ Reply to Thread
Results 1 to 4 of 4

Need Help to Open File from assigned Folder and Check one condition , Delete and Save.

  1. #1
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Need Help to Open File from assigned Folder and Check one condition , Delete and Save.

    Hi Everyone,

    I need small help in my written code and i know this will resolved here.

    I written a macro in File Checking and deleting workbook and rest all file will be there in assigned folder.

    I have some csv files in folder like (Johnxxx, Jessxxx, John25x) and it may be increase or decrease.

    what exactly i want here is , macro should open file and check if Range("A3") Empty then close file and delete file from the folder, and if Range("A3") contain some data then close the file and delete "xxx" from file name (means if in workbook "Johnxxx" range(A3) contain some data then "Johnxxx" workbook should close and delete "xxx" from file name "Johnxxx" to "John".

    I hope my explanation is understandable.

    Thanks in Advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need Help to Open File from assigned Folder and Check one condition , Delete and Save.

    Hi Everyone,

    I used Kill for file deleting, i just need code to remove "xxx" from file names.

    any help please !

    Thanks in advance.
    Last edited by Naveed Raza; 01-05-2013 at 09:35 AM.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Need Help to Open File from assigned Folder and Check one condition , Delete and Save.

    Try something like this...

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 01-05-2013 at 11:02 AM.

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Need Help to Open File from assigned Folder and Check one condition , Delete and Save.

    Thank you so much sir its work perfectly.

    Thank you once again

+ 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