Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application.FileSearch | Excel Discussion (Misc queries) | |||
Application.FileSearch Help | Excel Programming | |||
What is better: Application.FileSearch or Dir ?? | Excel Programming | |||
Application.Filesearch | Excel Programming | |||
VBA Application.FileSearch | Excel Programming |