View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JMay JMay is offline
external usenet poster
 
Posts: 422
Default Don't understand results of UDF

Thanks Jim,
Yes, that's what I decided I needed to do,
based on JE's comment. Thanks for "nailing-it"!!
JMay

"Jim Cone" wrote in message
:

Or remove:
& "\*.*"
To give you:
X = Dir(PathName)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"JMay"
wrote in message
In cell B4 I have (as text):
C:\Documents and Settings\XlsFileSavedAsText.txt
In Cell C2 I have:
=PathExists(B4)
In my Module1 I have:

Private Function PathExists(PathName As String) As Boolean
' Returns True If PathExists
On Error GoTo NoPath
x = Dir(PathName & "\*.*")
If x = "" Then GoTo NoPath
PathExists = True
Exit Function
NoPath:
PathExists = False
End Function

Why is my Cell C2 showing False
when I definitely
C:\Documents and Settings\XlsFileSavedAsText.txt Exists?
TIA,
Jim