Excel 2007 Application.Filesearch
Nach Umstellung auf Office 2007 funktioniert Makro nicht mehr
Hallo zusammen,
Durch die Umstellung auf Office 2007 funktionieren einige Makros nicht mehr, die die FUnktion Application.Filesearch nutzen. Diese Funktion ist ja nciht mehr vorhanden. Ich habe allerdings mit Hilfestellungen aus dem Internet so meine Probleme und wollte daher fragen, ob mir jemand Hilfestellung geben kann? Der Makrotext ist der folgende:
With Application.FileSearch
.NewSearch
.LookIn = pfad
.SearchSubFolders = True
.Filename = file & ".xls"
.FileType = msoFileTypeAllFiles
If .Execute() > 0 Then .MatchTextExactly = True
.FileType = msoFileTypeAllFiles
End With
If Application.FileSearch.MatchTextExactly = True Then 'if file has been found
Workbooks.OpenText (pfad & file & ".xls") 'open source file
Sheets("A").Select
Sheets("A").Copy after:=Workbooks(target).Sheets(1) 'copy requirement sheet to this file
Workbooks(file & ".xls").Close savechanges:=False 'closes the requirement file
Gruß und Dank
Patrick
Durch die Umstellung auf Office 2007 funktionieren einige Makros nicht mehr, die die FUnktion Application.Filesearch nutzen. Diese Funktion ist ja nciht mehr vorhanden. Ich habe allerdings mit Hilfestellungen aus dem Internet so meine Probleme und wollte daher fragen, ob mir jemand Hilfestellung geben kann? Der Makrotext ist der folgende:
With Application.FileSearch
.NewSearch
.LookIn = pfad
.SearchSubFolders = True
.Filename = file & ".xls"
.FileType = msoFileTypeAllFiles
If .Execute() > 0 Then .MatchTextExactly = True
.FileType = msoFileTypeAllFiles
End With
If Application.FileSearch.MatchTextExactly = True Then 'if file has been found
Workbooks.OpenText (pfad & file & ".xls") 'open source file
Sheets("A").Select
Sheets("A").Copy after:=Workbooks(target).Sheets(1) 'copy requirement sheet to this file
Workbooks(file & ".xls").Close savechanges:=False 'closes the requirement file
Gruß und Dank
Patrick
Please also mark the comments that contributed to the solution of the article
Kommentar vom Moderator Biber am Sep 08, 2011 um 19:30:34 Uhr
Verschoben von "Linux"-"Office" nach "Windows"-"Office".
Content-Key: 163901
Url: https://administrator.de/contentid/163901
Printed on: April 24, 2024 at 13:04 o'clock
1 Comment