+ Reply to Thread
Results 1 to 4 of 4

how to check if folder exists

  1. #1
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500

    Question how to check if folder exists

    hi does anybody know how i am find out if the folder already exist I have a macro which opens a specific folder and then creates a new folder within. It works how ever everytime I run and if the folder exists it comes up with an error Run-time error 75 : Path/file access error. which is correct as it cannot create two folders exactly the same.

    any ideas around this?

  2. #2
    Jezebel
    Guest

    Re: how to check if folder exists

    trap the error.



    "funkymonkUK" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > hi does anybody know how i am find out if the folder already exist I
    > have a macro which opens a specific folder and then creates a new
    > folder within. It works how ever everytime I run and if the folder
    > exists it comes up with an error Run-time error 75 : Path/file access
    > error. which is correct as it cannot create two folders exactly the
    > same.
    >
    > any ideas around this?
    >
    >
    > --
    > funkymonkUK
    > ------------------------------------------------------------------------
    > funkymonkUK's Profile:
    > http://www.excelforum.com/member.php...o&userid=18135
    > View this thread: http://www.excelforum.com/showthread...hreadid=475775
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: how to check if folder exists

    On error resume next
    mkdir "C:\ABC"
    mkdir "C:\ABC\EFG"
    On Error goto 0

    --
    Regards,
    Tom Ogilvy

    "funkymonkUK" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > hi does anybody know how i am find out if the folder already exist I
    > have a macro which opens a specific folder and then creates a new
    > folder within. It works how ever everytime I run and if the folder
    > exists it comes up with an error Run-time error 75 : Path/file access
    > error. which is correct as it cannot create two folders exactly the
    > same.
    >
    > any ideas around this?
    >
    >
    > --
    > funkymonkUK
    > ------------------------------------------------------------------------
    > funkymonkUK's Profile:

    http://www.excelforum.com/member.php...o&userid=18135
    > View this thread: http://www.excelforum.com/showthread...hreadid=475775
    >




  4. #4
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500
    thanks that workes. thanks 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