08-07-2009, 12:18 PM
Add this somewhere in a module
Then you can do
Or.. If it doesnt exist, you can create it like
Code:
Function FileExist(File As String, FileType As VbFileAttribute) As Boolean
On Error GoTo ErrOut
If LenB(Dir$(File, FileType)) Then FileExist = True
Exit Function
ErrOut:
FileExist = False
End FunctionThen you can do
Code:
If FileExist(App.Path & "\File.ini", vbNormal) Then
End IfOr.. If it doesnt exist, you can create it like
Code:
If Not FileExist(App.Path & "\File.ini", vbNormal Then
End if