Apr 3, 2006 #1 kliz0328 Programmer Nov 7, 2005 138 US I was wondering how to check and see if a folder path is valid or not? Is there some kind of IsValidPath function?
I was wondering how to check and see if a folder path is valid or not? Is there some kind of IsValidPath function?
Apr 3, 2006 1 #2 ssatech Technical User Feb 27, 2003 361 IE Try something like: Private Sub Form_Open(Cancel As Integer) If Dir("C:\Program Files\Something", vbDirectory) = "" Then MsgBox "Folder does not exist" Else MsgBox "Folder Exist" End If End Sub Or you could try using: Set fso = CreateObject("Scripting.FileSystemObject") Upvote 0 Downvote
Try something like: Private Sub Form_Open(Cancel As Integer) If Dir("C:\Program Files\Something", vbDirectory) = "" Then MsgBox "Folder does not exist" Else MsgBox "Folder Exist" End If End Sub Or you could try using: Set fso = CreateObject("Scripting.FileSystemObject")