#1   Report Post  
Posted to microsoft.public.excel.misc
Arien
 
Posts: n/a
Default does a file exist


I would like to make a True/False statement in an excel-formula that
checks
if a certain file exists on the harddisk or not.
There must be some kind of VBA statement for that.

Please let me know if you can help me. Thanks.

Arien de Haan
Eindhoven, NL


--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=497521

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default does a file exist

Best to add a UDF

Function BookExists(wb As String)
BookExists = Len(Dir(wb)) 0
End Function

and use like

=IF(BookExists("C:\myfile.xls"), "yes","no")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Arien" wrote in message
...

I would like to make a True/False statement in an excel-formula that
checks
if a certain file exists on the harddisk or not.
There must be some kind of VBA statement for that.

Please let me know if you can help me. Thanks.

Arien de Haan
Eindhoven, NL


--
Arien
------------------------------------------------------------------------
Arien's Profile:

http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=497521



  #3   Report Post  
Posted to microsoft.public.excel.misc
Peter Rooney
 
Posts: n/a
Default does a file exist

Arien,

Here's some code I use to delete a dummy file from the C drive - I'm sure
you can adapt it to your needs.

Regards & happy New Year

Pete

If Dir("C:\Holidays+Training+Sickness Chart.xls") < "" Then
Kill "C:\Holidays+Training+Sickness Chart.xls"
End If

"Arien" wrote:


I would like to make a True/False statement in an excel-formula that
checks
if a certain file exists on the harddisk or not.
There must be some kind of VBA statement for that.

Please let me know if you can help me. Thanks.

Arien de Haan
Eindhoven, NL


--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=497521


  #4   Report Post  
Posted to microsoft.public.excel.misc
Arien
 
Posts: n/a
Default does a file exist


It works. Thanks a lot.
regards, Arien de Haan



Bob Phillips Wrote:
Best to add a UDF

Function BookExists(wb As String)
BookExists = Len(Dir(wb)) 0
End Function

and use like

=IF(BookExists("C:\myfile.xls"), "yes","no")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Arien" wrote in
message
...

I would like to make a True/False statement in an excel-formula that
checks
if a certain file exists on the harddisk or not.
There must be some kind of VBA statement for that.

Please let me know if you can help me. Thanks.

Arien de Haan
Eindhoven, NL


--
Arien

------------------------------------------------------------------------
Arien's Profile:

http://www.excelforum.com/member.php...fo&userid=1892
View this thread:

http://www.excelforum.com/showthread...hreadid=497521



--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=497521

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasword protected Excel file encrypted, how do I read this file? jonesteam Excel Discussion (Misc queries) 2 December 12th 05 06:32 PM
Weird File Open/Save As Behavior [email protected] Excel Discussion (Misc queries) 0 December 9th 05 02:26 AM
Excel file automatically opens Lost4Now Excel Discussion (Misc queries) 6 December 4th 05 09:35 PM
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM
cannot open excel file, please help!!! sunlite Excel Discussion (Misc queries) 0 September 5th 05 05:29 PM


All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"