Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function that tells if string entry is a file

Status
Not open for further replies.

ziwacky

Programmer
Jun 27, 2000
43
US
Hi there,

Is there any function that will tell me if the user entry (to a textbox, so it is a string) is a file. Maybe something like IsFile(txtFile).

Thanks,

Z
 
Dim sFile as String

sFile="c:\temp\MyFile.txt"
If Len(Dir(sFile))>0 Then
'File exists
Else
'File does not exist
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top