AboutRavindra Expertise visual basic application programming from design to access information, sql, engineering and commercial applications. access databases, excel.
Optional:
1) if you want me to spend quality time and do special work, i expect to be paid a reasonable price for my time.
2) if you are pleased with my reply you could consider a donation of 1$.
3) you can visit my website http://ravindra.coolpage.biz (under constrn)
Experience
Past/Present clients project work for a Norway company, and a Canadian company completed. Freelance Project work and Teaching
teaching vb
Expert: Ravindra Date: 7/23/2008 Subject: Search for a FIle on a Drive in VB6
Question Hello,
I am using VB6. I have been having some trouble determining the proper search command to search for a file name on a drive and return the entire file path if found.
Thanks,
DuBois
Answer 'put a check mark on PRoject_references _ Microsoft Scripting runtime
Public Function FileExists(sFullPath As String) As Boolean
Dim oFile As New Scripting.FileSystemObject
FileExists = oFile.FileExists(sFullPath)
End Function
use
If FileExists("C:\vb\yourfilename.vbp") = True Then
msgbox ("File Exists")
else
msgbox("File Does Not exist")
end if
' this is a sample code and you need to make changes as needed