+ Reply to Thread
Results 1 to 7 of 7

Overwrite existing directory

  1. #1
    Registered User
    Join Date
    10-25-2013
    Location
    sc
    MS-Off Ver
    Excel 2007
    Posts
    32

    Overwrite existing directory

    Hello,

    I'm having a problem with overwriting a directory. I have a userform where if the directory doesn't exist I use MKDIR to create the directory but I also want the user to be able to overwrite the directory. Is there anyway to do this? I have the following code:

    Please Login or Register  to view this content.
    yrcbg and monthcbg are comboboxes if that even makes a difference

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Overwrite existing directory

    Do you want to delete the old directory, not just renaming it?

  3. #3
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Overwrite existing directory

    If you have documents opened in the directory that you want to rename, an error may occur from that given your code sample.

  4. #4
    Registered User
    Join Date
    10-25-2013
    Location
    sc
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Overwrite existing directory

    @berlan,

    Yes I would like to delete the old directory.

  5. #5
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Overwrite existing directory

    Ok, it isn't one of my fortes, but I will look into it

  6. #6
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Overwrite existing directory

    One way:

    Please Login or Register  to view this content.
    Last edited by berlan; 11-25-2013 at 11:22 AM.

  7. #7
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Overwrite existing directory

    Any feedback??

+ 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. Overwrite existing record
    By bryan1706 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2012, 11:15 AM
  2. Overwrite existing data
    By kishoremcp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2012, 09:10 PM
  3. Command to 'overwrite' existing sheet
    By Greed in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2011, 01:35 PM
  4. Overwrite existing excel sheets
    By med1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-18-2011, 03:36 PM
  5. Overwrite existing workbook without prompting
    By Cumberland in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2007, 12:23 PM

Tags for this Thread

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