In Excel 2010 (Tech Preview) I get error 445 "Object does not support this
action" pointing to first statement in sub. So it seems your are right, Don,
about it not running in XL2007
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
"Don Guillett" wrote in message
...
Another way. Probably does NOT work in 2007
Sub countfiles()
With Application.FileSearch
.LookIn = "C:\a"
.FileType = msoFileTypeExcelWorkbooks
MsgBox (.FoundFiles.Count)
End With
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Oldetowne" wrote in message
...
My sheet contains an entry for a folder. I need to return the file count
from
that directory into another cell in the same row. I am only moderately
familiar with using macros and scripting. Any help will be very much
appreciated