| checks if file and path are ok. I use it when opening a data base to see if my data file is there. Very easy No APIs.................. Dim myfile As String Private Sub Command1_Click() myfile = Dir("c:\windows\calc.exe", vbNormal) 'enter file path and name myfile = Format(myfile, "<") 'change To lower Case 'file not found If myfile = "" Then MsgBox "c:\windows\calc.exe was Not found!", vbExclamation, "Error" 'file found ElseIf myfile = "calc.exe" Then MsgBox "c:\windows\calc.exe Found!", , "system info" End If End Sub |
Check if path and file are ok |
Express News India | Freelance ecommerce web development India