If you want to see directories, you need the attributes in the call to Dir, otherwise this is okay
Dir[(pathname[, attributes])]
Also, when you call FileDateTime, the file may not be found because the FileDateTime function is only getting the filename, not the path. You could include the path in this call: FileDateTime("\\Meas_move\
It may be a bit big for a message box, but otherwise that's okay
Main Topics
Browse All Topics





by: sirbountyPosted on 2005-07-20 at 15:47:57ID: 14490188
Try this way:
over\EFMDA TA\"
Public Sub EFMDATA()
Dim strFileName As String, strPath as string
strPath="\\Meas_move\FileM
strFileName = Dir(strPath)
Dim myFiles As String
While strFileName <> ""
myFiles = myFiles & vbCrLf & strFileName & FileDateTime(strPath & strFileName)
strFileName = Dir
Wend
MsgBox myFiles
End Sub