Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Platform Upgrade (97 SR2)

    One of our IT guys decided to upgrade a user's machine to Windows 2000. (yes, we're a good two years behind here...) My question is, I have the following code running a search for a set of files I have saved to a common network location:

    With Application.FileSearch
    '/Reset the search.
    .NewSearch
    '/Specify the directory that contains the files you want to process.
    .LookIn = sTargetFolder
    '/Exclude subfolders.
    .SearchSubFolders = False
    '/Specify what types of files you want to find.
    .FileName = csExcelExtension
    '/The Execute command begins the search.
    .Execute
    end with

    For some reason, after the OS upgrade, the code in bold above (.Filename = csExcelExtension) is not recognized, in fact, it comes back with Run-Time Error #5: Invalid Procedure or Argument. Does anyone have any idea what's going on here? We only upgraded the OS, not the office version.

    Thanks!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Platform Upgrade (97 SR2)

    Kel,

    Might that be a user-defined constant?

    I had a feeling that there was a txt file (or maybe registry settings) into which constants could be defined.

    Or it could have been defined in a Personal.xls- but the installation of Windows 2000 has changed the paths.

    Do you still have a machine where it works? You might be able to trace it better if you did.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Platform Upgrade (97 SR2)

    Further to Geoff's question, you wouldn't be confusing argument

    .FileName Read/write String.

    with argument

    .FileType

    by any chance? The MsoFileType constants are: msoFileTypeAllFiles, msoFileTypeBinders, msoFileTypeDatabases, msoFileTypeExcelWorkbooks, msoFileTypeOfficeFiles, msoFileTypePowerPointPresentations, msoFileTypeTemplates, or msoFileTypeWordDocuments. The default value is msoFileTypeOfficeFiles. Read/write Variant.

    Actually, I ask because you confused me. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •