there is a mistake
Sub foglioDate()
arow = 2
Call CallTest("D:\DATI\prova\", arow)
End Sub
Sub CallTest(sPath As String, arow)
Dim strPath As String
Dim sFile() As String
Dim TotFile, x As Long
Cells(2, 1).Activate
TotFile = 0
strPath = Dir(sPath & "*.*", vbDirectory)
While strPath <> ""
If strPath <> "." And strPath <> ".." Then
' If (GetAttr(sPath & strPath) And vbDirectory) = vbDirectory Then
If GetAttr(sPath & strPath) = vbDirectory Then
TotFile = TotFile + 1
ReDim Preserve sFile(TotFile)
sFile(TotFile) = sPath & strPath & "\"
Else
Cells(arow, 1).Value = strPath
Cells(arow, 2).Value = FileDateTime(sPath & strPath)
arow = arow + 1
End If
End If
strPath = Dir()
Wend
If TotFile <> 0 Then
For x = 1 To TotFile
Call CallTest(sFile(x), arow)
Next
End If
End Sub
Bookmarks