Solved

Find Files

Posted on 1998-10-26
2
147 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 64
maro to copy and paste from one worksheet to another based on a condition 11 53
VBA Shell can't Find Word document 11 92
vbModal 12 51
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

773 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