with application.filesearch

R

Rick

What happend to the following function? Now that I'm using Vista and Excel
2007.

With Application.FindSearch
.Filename = FleName
.LookIn = SrchFlePath
.TextOrProperty = SrchNam
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderDescending) > 0 Then
For i = 1 To .FoundFiles.Count
SrchNme = .FoundFiles.Item(i)
Vrsxls = Right(SrchNme, 6)
VrsNum = Left(Vrsxls, 2)
If IsNumeric(VrsNum) Then
VrsNbr = Left(Vrsxls, 2)
Else
VrsNbr = 0
End If
Exit For
Next i
Else
VrsNbr = 0
End If
VrsNbr = VrsNbr + 1
VrsNo = Format(VrsNbr, "00")
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top