Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default with application.filesearch

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default with application.filesearch

FileSearch (not .FindSearch) was removed in xl2007.

Ron de Bruin shares a couple of replacements:
http://www.rondebruin.nl/copy3.htm (for Dir())
and
http://www.rondebruin.nl/fso.htm (for FSO)



Rick wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.FileSearch Cleberton(Brazilian) Excel Discussion (Misc queries) 2 October 26th 09 01:21 PM
Set fs = Application.FileSearch [email protected] Excel Programming 4 April 15th 08 10:17 PM
Application.FileSearch Help Patrick Kirk Excel Programming 2 April 7th 08 06:22 PM
Application.Filesearch EA Excel Programming 3 August 17th 06 10:07 AM
VBA Application.FileSearch Roger Frye Excel Programming 0 March 5th 04 04:07 AM


All times are GMT +1. The time now is 02:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"