Filesearch problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    #1

    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.Filesear ch

    Set fsAllFiles = Application.Fil esearch

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

    Any help appreciated.

    Cheers

    Kevin



  • pietlinden@hotmail.com

    #2
    Re: Filesearch problem

    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.

    Comment

    Working...