Solved

Find Files

Posted on 1998-10-26
2
145 Views
Last Modified: 2010-04-30
I want to check if a files is on my pc in a function. Please help me
0
Comment
Question by:ceb102298
2 Comments
 
LVL 14

Accepted Solution

by:
waty earned 10 total points
ID: 1441618
Public Function FileExist(ByVal szFile As String) As Boolean
   ' *** Verify if a file Exist ***

   Dim szResults           As String
   
   On Error GoTo Not_FileExist
   
   szResults = Dir$(szFile)
   If (szResults = "") Then
       FileExist = False
   Else
       FileExist = True
   End If

   Exit Function

Not_FileExist:
   FileExist = False

End Function
 
0
 

Author Comment

by:ceb102298
ID: 1441619
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now