Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help creating a report from a data table | Excel Discussion (Misc queries) | |||
Need a ISWorkday Function -- Any Ideas | Excel Worksheet Functions | |||
Hyperlinks using R[1]C[1] and offset function in its cell referenc | Excel Worksheet Functions | |||
Conversion | Excel Worksheet Functions | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |