Hi, I want to know how to check if a file exists? how? Thank you, Arie. (mag.up.co.il)
VB Code: Private Function Exists(strFullPath As String) As Boolean Exists = Len(Dir$(strFullPath)) <> 0 End Function use that
Private Function Exists(strFullPath As String) As Boolean Exists = Len(Dir$(strFullPath)) <> 0 End Function
VB Code: Private Sub Form_Load() If Exists("c:\windows\font.zip") = True Then MsgBox "The File Exist" Else MsgBox "The File Do NOT Exist" End If End Sub Private Function Exists(strFullPath As String) As Boolean Exists = Len(Dir$(strFullPath)) <> 0 End Function
Private Sub Form_Load() If Exists("c:\windows\font.zip") = True Then MsgBox "The File Exist" Else MsgBox "The File Do NOT Exist" End If End Sub Private Function Exists(strFullPath As String) As Boolean Exists = Len(Dir$(strFullPath)) <> 0 End Function
Thank you, Arie.
Forum Rules