Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 504
Default function to seach directory for file location

i have to keep individual files on each piece of equipment.
i am looking for a way to search a directory to see if the file exists.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 296
Default function to seach directory for file location

On Mon, 28 Aug 2006 07:57:01 -0700, kevin
wrote:

i have to keep individual files on each piece of equipment.
i am looking for a way to search a directory to see if the file exists.


I usually use the VBA command

Dir(Myfilename)

This returns a Null "" string if MyFilename does not exist so
something like the following will alert you. If you need to check for
many files as your Q. suggests then you'd need to build this into a
loop and change the Myfilename variable each time through the loop.

Sub FileExists
If Dir("c:\Myfilename") = "" Then
MsgBox "File missing"
End If
End Sub

HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
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
Help creating a report from a data table sumitk Excel Discussion (Misc queries) 0 August 23rd 06 03:35 PM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 09:16 AM.

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"