View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Is filepath valid?

You need a function. Open VB editor (ALT + F11) insert a new module and paste
this code in:

Public Function Filethere(strFullPath As String) As Boolean
If Not Dir(strFullPath, vbDirectory) = vbNullString Then Filethere = True
End Function

in b1 next to your filepath in a1 type =filethere(a1)
drag down as required.
It will return true if the path is valid or false.

Will that do?

Mike

"Rookie_User" wrote:

I have a column that contains a file path with the file at the end - all
contained in the cell. There are about 150 rows. I would like to put
something in column be that says - yes the path and file are truly there or
No it is invalid. I have searched multiple places and have not found
anything pointing to how to do this?