checking file existence

Posted on 2004-09-24
Last Modified: 2010-05-02
XD i asked the same que. in ASP but i need them both so sombody can tell me how i check some file existence?
Question by:blabliblo
  • 2

Accepted Solution

mladenovicz earned 125 total points
ID: 12141494
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.fileexists("C:\temp\zeljko.jpg") Then
End If

Expert Comment

ID: 12141501
Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.fileExists(YourFileName) Then
    ' file exists
    ' file does not exist
End If

Set fso = Nothing

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity 2008 2 56
Concatenate 2 userform comboboxes to a userform text box 4 56
message box in access 4 41
VBA Shell can't Find Word document 11 76
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

920 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

14 Experts available now in Live!

Get 1:1 Help Now