+ Reply to Thread
Results 1 to 4 of 4

vba delete

  1. #1
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    vba delete

    Hi,

    I have written (with help from the forum) a sequence of macros for a colleague to run when I am on holiday. There are specific files that must be updated weekly.

    I am trying to cover all angles for my colleague. So a hypothetical - the system goes down halfway through the procedure which takes about two hours.

    Is it possible to write a macro to do the following -

    Go to a certain directory say C:\SALES\

    If a specific file exists i.e. Summary 080811.xls then delete it?

    This would take her back to where I left off and she can just start from scratch again.
    Last edited by timbo1957; 07-28-2011 at 05:32 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: vba delete

    Take a look at the Kill command
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    Re: vba delete

    Just the job.

    Thanks Roy.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: vba delete

    No problem Tim. Thanks for the rep

+ 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