Hello,
I have this function that search for .jpg files:
Function Filecount(strLookin As String)
Dim file As Variant
With Application.FileSearch
.FileName = ".jpg"
.LookIn = strLookin
.SearchSubFolders = True
.Execute
For Each file In .FoundFiles
Next file
FileAmount = .FoundFiles.Count
End With
End Function
I want that this function also find files with the extension .tif and .bmp. I tried in in several manners, but the only solution is to write this function for every extension again. Can one function find files with the extension .jpg, .tif and .bmp?
Thanks,
Albert
I have this function that search for .jpg files:
Function Filecount(strLookin As String)
Dim file As Variant
With Application.FileSearch
.FileName = ".jpg"
.LookIn = strLookin
.SearchSubFolders = True
.Execute
For Each file In .FoundFiles
Next file
FileAmount = .FoundFiles.Count
End With
End Function
I want that this function also find files with the extension .tif and .bmp. I tried in in several manners, but the only solution is to write this function for every extension again. Can one function find files with the extension .jpg, .tif and .bmp?
Thanks,
Albert