Private Sub Command1_Click()
MsgBox NumOfFiles("C:\Test\" & " files in C:\Test\"
End Sub
Function NumOfFiles(Path As String) As Long
Dim MyFile As String
Dim Counter As Long
MyFile = Dir(Path & "*.*"
Do While MyFile <> vbNullString
MyFile = Dir
Counter = Counter + 1
Loop
NumOfFiles = Counter
End Function Swi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.