Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This Code Worked PERFECT in V2003 - I'm having a time getting the equivalent
to work for me in V2007. Can someone assist me? TIA, Sub ListFiles() Dim s As String Dim sfolder As String sfolder = Range("D1").Value s = Range("B3").Value Range("B4:B65536").ClearContents s2 = "*" & s & "*.*" With Application.FileSearch .NewSearch .LookIn = sfolder .SearchSubFolders = True .Filename = s2 .FileType = msoFileTypeAllFiles If .Execute() 0 Then MsgBox "There were " & .FoundFiles.Count & _ " file(s) found." For i = 1 To .FoundFiles.Count ActiveSheet.Cells(i + 3, 2).Value = _ Mid(.FoundFiles(i), 64, 256) Next i Else MsgBox "There were no files found." End If End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to read .dat excel files in v2003 | Excel Discussion (Misc queries) | |||
excel spreadsheets freeze in v2007 (xp pro SP3) | Excel Discussion (Misc queries) | |||
No Save Prompt dialog box when existing (V2003) | Excel Discussion (Misc queries) | |||
Mail Merge default directory v2003 | Setting up and Configuration of Excel | |||
Mail Merge default directory v2003 | Setting up and Configuration of Excel |