figment
04-21-2008, 03:40 PM
i just got upgraded to office 2007 and this function stopped working
Function list1(location As String, start As Long)
Dim a As Long
With Application.FileSearch
Application.FindFile
.LookIn = location
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If (.Execute <> 0) Then
For a = 1 To .FoundFiles.Count
If LCase(Right(.FoundFiles.Item(a), 3)) = "dwg" Then
Worksheets("Files").Range("A" & start) = .FoundFiles.Item(a)
start = start + 1
End If
Next
End If
End With
list1 = start
End Function
i use this function may many times a day, if some one could help me replace i would be vary greatfull
Function list1(location As String, start As Long)
Dim a As Long
With Application.FileSearch
Application.FindFile
.LookIn = location
.FileType = msoFileTypeAllFiles
.SearchSubFolders = True
If (.Execute <> 0) Then
For a = 1 To .FoundFiles.Count
If LCase(Right(.FoundFiles.Item(a), 3)) = "dwg" Then
Worksheets("Files").Range("A" & start) = .FoundFiles.Item(a)
start = start + 1
End If
Next
End If
End With
list1 = start
End Function
i use this function may many times a day, if some one could help me replace i would be vary greatfull