On
Error
Resume
Next
Set
ExcApp = CreateObject(
"Excel.Application"
)
On
Error
GoTo
0
Set
ExcWb2 = ExcApp.Workbooks.Open(ExtDateipfad)
Set
ExcWs2 = ExcWb2.Sheets(Tabellenname)
ExcWb2.Activate
ExcApp.Visible =
True
ExcApp.ActiveWindow.WindowState = xlMaximized
ExcWs2.Activate
ExcWs2.Visible =
True
ExcWs2.Cells(ExcWs2.Cells(Rows.Count, 1).
End
(xlUp).Row, 1).
Select
Dim
rng
As
Range
Set
rng = ExcApp.Selection
Do
DoEvents
Loop
Until
ExcApp.Selection.Address <> rng.Address
Debug.Print ExcApp.Selection.Address
Debug.Print rng.Address
ExcApp.Visible =
True
With
ExcWb2
.Activate
.Saved =
True
.Close
End
With
ExcApp.Quit
Set
ExcWb2 =
Nothing