please help me with my code.

When I enter the exact filename in the text1.text it will find the filename.dat in my folder.
but it seems the code cant find it even i type the exact filename even the case.

 strBackSlash = IIf(Right$(App.Path, 1) = "\", "", "\")
strEmpFileName = App.Path & strBackSlash & "'" & Text1.Text & "'"
intEmpFileNbr = FreeFile

can u help me? Thanks.

I've never used FreeFile but, if I understand it correctly, it's supposed to return the number of the next file available for FileOpen.

You might try using FileSystemObject.FileExists(strEmpFileName).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.