S
Steve
I have this UDF:
Function FileCount(FolderName As String, _
Optional FileFilter As String = "*", _
Optional FileTypes As Long = 1, _
Optional SubFolders As Boolean = False)
As Long
With Application.FileSearch
.NewSearch
.LookIn = FolderName
.SearchSubFolders = SubFolders
.Filename = FileFilter
.MatchTextExactly = True
.FileType = FileTypes
.Execute
FileCount = .FoundFiles.Count
End With
End Function
I use it in a group of cells to go to a UNC path to count
the number of files in the folder.
Formula example:
=FileCount
("\\Thtree\.AASJAPN00013_INSTALL.SJ.AA.MI.ER.TH\Nalkits\Sec
urityPatchIE_MS_0216200400_L2K2_40\Patchlog")
This works fine when I initially put the formula into the
cell, but afterward I want it to check for additional
files that may get added.
How do you force this formula to run again???
Function FileCount(FolderName As String, _
Optional FileFilter As String = "*", _
Optional FileTypes As Long = 1, _
Optional SubFolders As Boolean = False)
As Long
With Application.FileSearch
.NewSearch
.LookIn = FolderName
.SearchSubFolders = SubFolders
.Filename = FileFilter
.MatchTextExactly = True
.FileType = FileTypes
.Execute
FileCount = .FoundFiles.Count
End With
End Function
I use it in a group of cells to go to a UNC path to count
the number of files in the folder.
Formula example:
=FileCount
("\\Thtree\.AASJAPN00013_INSTALL.SJ.AA.MI.ER.TH\Nalkits\Sec
urityPatchIE_MS_0216200400_L2K2_40\Patchlog")
This works fine when I initially put the formula into the
cell, but afterward I want it to check for additional
files that may get added.
How do you force this formula to run again???