Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Globale Variable
- Dim fldr As FileDialog
- 'Pfad suchen
- Function GetFolder() As String
- Dim sItem As String
- Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
- With fldr
- .Title = "Select a Folder"
- .AllowMultiSelect = False
- .InitialFileName = Application.DefaultFilePath
- If .Show <> -1 Then GoTo NextCode
- sItem = .SelectedItems(1)
- End With
- NextCode:
- GetFolder = sItem
- Set fldr = Nothing
- End Function
- Sub FindText()
- Dim i As Integer
- With Application.FileSearch
- .LookIn = fldr
- .FileType = msoFileTypeAllFiles
- .SearchSubFolders = False
- .TextOrProperty = "_Applications" 'Such begriff
- .Execute 'Suche Starten
- 'Schleife für den names Print
- For i = 1 To .FoundFiles.Count
- MsgBox .FoundFiles(i)
- Next i
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement