473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Filesearch problem

Hi

I am using Filesearch to find a list of files in a directory, and then to
take the data and put it into an Access database. The code was working well
within VBA and I have ported it into VB6, and it no longer works.

Basically code is as follows:

Dim fsAllFiles as Office.Filesearch

Set fsAllFiles = Application.Filesearch

Here I get an Object Required error which I can't figure.

Any help appreciated.

Cheers

Kevin

Nov 13 '05 #1
1 2171
Kevin,
you probably do not have a reference to Office in your VB6 code, so the
libraries are not available.

You an use Dir() to do this, too.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: andybriggs | last post by:
Hi all, Two machines out of eight that are running an A97 database stored on a server are generating an "Invalid Procedure Call or Argument" error when encountering the .Filename property of...
3
by: Wilson Tan | last post by:
Has anybody encountered any problem with the Execute method or FilesFound property of the FileSearch object in Access 2002? I have this short routine that searches for a specific file that I'm...
1
by: Mark | last post by:
Can anyone please tell me why the following code works fine in Win98/Access97, but fails to recognize files with a ".zip" extension in WinXP/Access2002/2000? It correctly lists the name of each...
7
by: Brent McIntyre | last post by:
Good evening all, I am writing a program which requires me to search for files as I have done many times in Microsoft Excel Visual Basic for Applications, as per below. Set fs =...
19
by: Alan Carpenter | last post by:
Access 8 on Win98 and WinXP I'm having trouble with wildcards in the .Filename property of the FileSearch Object giving different results on win98 and XP. I've been successfully using...
2
by: stuart.medlin | last post by:
I have recently converted an Access 97 database to Access 2003. However, I am running into a problem with using Application.Filesearch to locate a file in my directory. The code follows: ...
22
tdw
by: tdw | last post by:
We just added a new login name in our server for a girl named Courtney. She is using a computer that I used to use. The following code in our Orders Database has alway worked fine, but when she is...
0
by: Mihov | last post by:
Hi Everybody, My name is Miho. I have developed number of macros using Visual Basic for Excel. Many of them use FileSearch which worked perfectly before Excel 2007. With Excel 2007 this is no...
3
by: MLH | last post by:
With Application.FileSearch .NewSearch .LookIn = "C:\My Documents" .SearchSubFolders = True .FileName = "Run" .MatchTextExactly = True .FileType = msoFileTypeAllFiles End With My code pukes...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.