MS Excel help vs. Valóság

Excel 2007 help, mégpedig a LookIn használatára:


Example
This example searches the My Documents folders for all files that begin with "Cmd" and displays the name and location of each file that’s found.

Set fs = Application.FileSearch
With fs
    .LookIn = "C:\My Documents"
    .FileName = "cmd*.*"
    If .Execute > 0 Then
        MsgBox "There were " & .FoundFiles.Count & _
        " file(s) found."
        For i = 1 To .FoundFiles.Count
            MsgBox .FoundFiles(i)
        Next i
    Else
        MsgBox "There were no files found."
    End If
End With

Amire felhívnám a figyelmet:
Application.Filesearch

Erről a Miocrosoft hivatalosan írja itt:

This issue occurs when you have 2007 Office programs installed on a Microsoft Windows XP computer, and the VBA macro uses the Application.FileSearch object. This object is no longer supported in 2007 Office programs.

Szóval ilyen igazából nincs is!

Dögöljön meg... még szerencse, hogy blogba írtam, miután jót káromkodtam (ugyanis erre épül a havi jelentésemet kreáló makró)... és persze van rá workaround.
Csak valahol ki kellett eresztemem egy kis gőzt...

Hozzászólások

A workaround-ot (by Jeggels) kicsit módosítottam, és jól működik... megúsztam...

----
Hol van a kígyónak farka? Minek annak az a nagy karkötő?