Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Set fs = Application.FileSearch

Hello Group,

I am using

Set fs = Application.FileSearch

With fs
.......
.......
........
End With

I get "Object required" error. So, what should I dim "fs" as? Should I
need to do something like

Dim wb as workbook?
If so, then what would be
Dim fs as ?

Kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Set fs = Application.FileSearch

Got it.. The following does the trick.

With Application.FileSearch
.....
.......
........
End With

Kevin

On Apr 15, 9:32 am, wrote:
Hello Group,

I am using

Set fs = Application.FileSearch

With fs
......
......
.......
End With

I get "Object required" error. So, what should I dim "fs" as? Should I
need to do something like

Dim wb as workbook?
If so, then what would be
Dim fs as ?

Kevin


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Set fs = Application.FileSearch

Somthing like this maybe

Sub Find()
Dim fs As Object

Set fs = Application.FileSearch

With fs
.LookIn = "c:\my documents"
.FileType = msoFileTypeExcelWorkbooks
.Execute

End With
End Sub



" wrote:

Hello Group,

I am using

Set fs = Application.FileSearch

With fs
.......
.......
........
End With

I get "Object required" error. So, what should I dim "fs" as? Should I
need to do something like

Dim wb as workbook?
If so, then what would be
Dim fs as ?

Kevin

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default Set fs = Application.FileSearch

On Apr 15, 11:45*am, Office_Novice
wrote:
Somthing like this maybe

Sub Find()
* * Dim fs As Object

* * Set fs = Application.FileSearch

* * With fs
* * * * .LookIn = "c:\my documents"
* * * * .FileType = msoFileTypeExcelWorkbooks
* * * * .Execute

* * End With
End Sub



" wrote:
Hello Group,


I am using


Set fs = Application.FileSearch


With fs
.......
.......
........
End With


I get "Object required" error. So, what should I dim "fs" as? Should I
need to do something like


Dim wb as workbook?
If so, then what would be
Dim fs as ?


Kevin- Hide quoted text -


- Show quoted text -


It works if you just dim it and not set its type:

Dim fs
Set fs = Application.FileSearch


Cory
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Set fs = Application.FileSearch

Or even:

dim FS as FileSearch



" wrote:

On Apr 15, 11:45 am, Office_Novice
wrote:
Somthing like this maybe

Sub Find()
Dim fs As Object

Set fs = Application.FileSearch

With fs
.LookIn = "c:\my documents"
.FileType = msoFileTypeExcelWorkbooks
.Execute

End With
End Sub



" wrote:
Hello Group,


I am using


Set fs = Application.FileSearch


With fs
.......
.......
........
End With


I get "Object required" error. So, what should I dim "fs" as? Should I
need to do something like


Dim wb as workbook?
If so, then what would be
Dim fs as ?


Kevin- Hide quoted text -


- Show quoted text -


It works if you just dim it and not set its type:

Dim fs
Set fs = Application.FileSearch

Cory


--

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
Application.FileSearch Help Patrick Kirk Excel Programming 2 April 7th 08 06:22 PM
What is better: Application.FileSearch or Dir ?? WhytheQ Excel Programming 9 October 25th 06 01:29 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 05:36 AM.

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

About Us

"It's about Microsoft Excel"