PC Review


Reply
Thread Tools Rate Thread

Application.FileSearch 2003 vs 2007

 
 
Sgwapt
Guest
Posts: n/a
 
      20th Jun 2008
Seems that they removed this from the new version.
I have see some links but still cannot figure out what to do now.
Can someone please help? Thanks

Set Fs = Application.FileSearch
With Fs
.LookIn = "C:\Network\FileLocations\"
.Filename = "FileName.xls"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) = 0 Then
'Do nothing
Else
'Then set a formula in main dbs file to get next entry row cell in file it
was loking for.
Dim SetFile As String
SetFile = "FileName.xls"
Range("A1").Value = "'LookIn & "[" & SetFile & "]Sheet1'!$A$1"
End If
End With

The formula still does that apostrophe thing when file is not open and that
is what I need for changes to work.

Any help is highly appreciated

Thank you

--
George G
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      20th Jun 2008
FileSearch has been ditched in Excel 2007. Use Dir in its place, there is a
good example in Help.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sgwapt" <(E-Mail Removed)> wrote in message
news:B7200A9D-2F12-4FFC-95E9-(E-Mail Removed)...
> Seems that they removed this from the new version.
> I have see some links but still cannot figure out what to do now.
> Can someone please help? Thanks
>
> Set Fs = Application.FileSearch
> With Fs
> .LookIn = "C:\Network\FileLocations\"
> .Filename = "FileName.xls"
> If .Execute(SortBy:=msoSortByFileName, _
> SortOrder:=msoSortOrderAscending) = 0 Then
> 'Do nothing
> Else
> 'Then set a formula in main dbs file to get next entry row cell in file it
> was loking for.
> Dim SetFile As String
> SetFile = "FileName.xls"
> Range("A1").Value = "'LookIn & "[" & SetFile & "]Sheet1'!$A$1"
> End If
> End With
>
> The formula still does that apostrophe thing when file is not open and
> that
> is what I need for changes to work.
>
> Any help is highly appreciated
>
> Thank you
>
> --
> George G



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.FileSearch 2007 Reference Justin Microsoft Access Form Coding 1 9th Dec 2009 11:30 PM
Using Application.FileSearch in Access 2007 Chip Microsoft Access External Data 5 4th Nov 2009 01:00 AM
Application.FileSearch in Excel 2007! Mark Microsoft Excel Discussion 3 24th Jun 2009 04:56 PM
Application.FileSearch in 2007 Amery Microsoft Excel Programming 2 13th Dec 2007 10:49 PM
replacement for Application.FileSearch in 2007 =?Utf-8?B?U3RldmVEQjE=?= Microsoft Excel Programming 1 11th Jul 2007 06:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:32 PM.