harolda1980
Gebruiker
- Lid geworden
- 7 aug 2007
- Berichten
- 488
Ik heb de volgende code alleen werkt deze niet meer in Excel 2007. Heeft iemand een idee hoe ik dit week aan de gang krijg?
Sub Filesystemload()
Dim MyLookinlocatie
Sheets("gef").Select
Range("activelocation").Select
MyLookinlocatie = ActiveCell
Sheets("Filesystem").Select
Cells.Select
Selection.Delete
Range("A1").Select
With Application.FileSearch
.NewSearch
.LookIn = MyLookinlocatie 'HIER VERANDEREN
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Filename = ".XLS" 'HIER VERANDEREN
.LastModified = msoLastModifiedAnyTime
If .Execute > 0 Then
Sheets("Filesystem").Select
ActiveCell = .FoundFiles.Count
ActiveCell.Offset(1, 0).Select
End If
End With
With Application.FileSearch
.NewSearch
.LookIn = MyLookinlocatie 'HIER VERANDEREN
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Filename = ".XLS" 'HIER VERANDEREN
.LastModified = msoLastModifiedAnyTime
If .Execute > 0 Then
For lCount = 1 To .FoundFiles.Count
Sheets("Filesystem").Select
ActiveCell = .FoundFiles(lCount)
ActiveCell.Offset(1, 0).Select
Next lCount
End If
End With
End Sub
Sub Filesystemload()
Dim MyLookinlocatie
Sheets("gef").Select
Range("activelocation").Select
MyLookinlocatie = ActiveCell
Sheets("Filesystem").Select
Cells.Select
Selection.Delete
Range("A1").Select
With Application.FileSearch
.NewSearch
.LookIn = MyLookinlocatie 'HIER VERANDEREN
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Filename = ".XLS" 'HIER VERANDEREN
.LastModified = msoLastModifiedAnyTime
If .Execute > 0 Then
Sheets("Filesystem").Select
ActiveCell = .FoundFiles.Count
ActiveCell.Offset(1, 0).Select
End If
End With
With Application.FileSearch
.NewSearch
.LookIn = MyLookinlocatie 'HIER VERANDEREN
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Filename = ".XLS" 'HIER VERANDEREN
.LastModified = msoLastModifiedAnyTime
If .Execute > 0 Then
For lCount = 1 To .FoundFiles.Count
Sheets("Filesystem").Select
ActiveCell = .FoundFiles(lCount)
ActiveCell.Offset(1, 0).Select
Next lCount
End If
End With
End Sub