Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This will work for you assumimng you meant the windows directory and not all
subdirectories. Place it in a standard code module... Public Function FileExists(ByVal FileName As String) As Boolean FileExists = CBool(Len(Dir("C:\Windows\" & FileName))) End Function -- HTH... Jim Thomlinson "PeterW" wrote: Hi I am trying to put together a report in excel that shows whether or not certain files exist under the windows directory. By concatenating a number of fields I produce the name of the file I would like to check if it exists. If it exists I want the cell to return TRUE and if not FALSE. I think I will need a UDF to do this as I want to copy the formula to other cells that are concatenating other filenames to check. Any help would be appreciated. Peter -- PeterW ------------------------------------------------------------------------ PeterW's Profile: http://www.excelforum.com/member.php...fo&userid=6496 View this thread: http://www.excelforum.com/showthread...hreadid=493988 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi I am trying to put together a report in excel that shows whether or no certain files exist under the windows directory. By concatenating a number of fields I produce the name of the file would like to check if it exists. If it exists I want the cell t return TRUE and if not FALSE. I think I will need a UDF to do this as I want to copy the formula t other cells that are concatenating other filenames to check. Any help would be appreciated. Pete -- Peter ----------------------------------------------------------------------- PeterW's Profile: http://www.excelforum.com/member.php...nfo&userid=649 View this thread: http://www.excelforum.com/showthread.php?threadid=49398 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Jim .. that works -- PeterW ------------------------------------------------------------------------ PeterW's Profile: http://www.excelforum.com/member.php...fo&userid=6496 View this thread: http://www.excelforum.com/showthread...hreadid=493988 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF File Exists | Excel Programming | |||
Check if a directory exists and if it doesn t... | Excel Programming | |||
How to check if the directory exists? | Excel Programming | |||
the file already exists - do you want to replace the existing file? | Excel Programming | |||
Verify a directory exists | Excel Programming |