+ Reply to Thread
Results 1 to 3 of 3

filesystemobject

  1. #1
    Alvin Hansen
    Guest

    filesystemobject

    Hi

    If i use
    fso.Createfolder "c:\" & tt & tal & kur1

    How can i make a msgbox and exit if the folder allready exits

    Regards

    alvin


  2. #2
    K Dales
    Guest

    RE: filesystemobject

    fso.GetFolder("c:\" & tt & tal & kur1) returns an error if the foler does not
    exist, so,

    On Error goto NoFolder

    Set FolderObj = fso.GetFolder("c:\" & tt & tal & kur1)
    MsgBox "Folder already exists!"
    Exit Sub

    NoFolder:
    fso.Createfolder "c:\" & tt & tal & kur1
    ....

    "Alvin Hansen" wrote:

    > Hi
    >
    > If i use
    > fso.Createfolder "c:\" & tt & tal & kur1
    >
    > How can i make a msgbox and exit if the folder allready exits
    >
    > Regards
    >
    > alvin
    >


  3. #3
    Alvin Hansen
    Guest

    RE: filesystemobject

    Thanks
    its working

    Alvin


    "K Dales" skrev:

    > fso.GetFolder("c:\" & tt & tal & kur1) returns an error if the foler does not
    > exist, so,
    >
    > On Error goto NoFolder
    >
    > Set FolderObj = fso.GetFolder("c:\" & tt & tal & kur1)
    > MsgBox "Folder already exists!"
    > Exit Sub
    >
    > NoFolder:
    > fso.Createfolder "c:\" & tt & tal & kur1
    > ...
    >
    > "Alvin Hansen" wrote:
    >
    > > Hi
    > >
    > > If i use
    > > fso.Createfolder "c:\" & tt & tal & kur1
    > >
    > > How can i make a msgbox and exit if the folder allready exits
    > >
    > > Regards
    > >
    > > alvin
    > >


+ 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