CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13

Threaded View

  1. #6
    Join Date
    Apr 2002
    Location
    Melbourne, Victoria, Australia
    Posts
    1,792

    Re: Starting a function after invalid path is found

    Or you could use the FileSystemObject;

    Add a reference to Microsoft Scripting Runtime
    Code:
    Public Sub FindMyFolder(byval strFolderName as string) 
    dim fso As Scripting.FileSystemObject
    
    Set fso = new Scripting.FileSystemObject
    If Not fso.GetFolder(strFolderName) then
     call DoSomethingWhenFolderIsNotThere
    Else
     Call DoSomethingWhenFolderIsThere
    End If
    Set fso = nothing
    End Sub
    Last edited by Twodogs; February 17th, 2008 at 08:26 PM. Reason: Oops :)
    Be nice to Harley riders...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured