Option
Explicit
Sub
Agentur()
Dim
WBZiel
As
Workbook, ExportDatei
As
String
Dim
WBQuelle
As
Workbook
Set
WBZiel = ThisWorkbook
ExportDatei = Application.GetOpenFilename(
"Excel-Dateien, *.xl*"
, ,
"Bitte die Datei zum Kopieren öffnen ..."
)
If
Not
CVar(ExportDatei) =
False
Then
Application.DisplayAlerts =
False
ThisWorkbook.Sheets(
"Agentur"
).Delete
Application.DisplayAlerts =
True
Set
WBQuelle = Workbooks.Open(ExportDatei)
WBQuelle.Sheets(
"Agentur"
).Copy ThisWorkbook
WBQuelle.Close
False
End
If
End
Sub
Sub
Profis()
Dim
WBZiel
As
Workbook, ExportDatei
As
String
Dim
WBQuelle
As
Workbook
Set
WBZiel = ThisWorkbook
ExportDatei = Application.GetOpenFilename(
"Excel-Dateien, *.xl*"
, ,
"Bitte die Datei zum Kopieren öffnen ..."
)
If
Not
CVar(ExportDatei) =
False
Then
Application.DisplayAlerts =
False
ThisWorkbook.Sheets(
"Profis"
).Delete
Application.DisplayAlerts =
True
Set
WBQuelle = Workbooks.Open(ExportDatei)
WBQuelle.Sheets(
"Profis"
).Copy ThisWorkbook
WBQuelle.Close
False
End
If
End
Sub