Habe bisher mit einer Datei eine andere Datei über eine Art Autostartdatei geöffnet:
....
For liDurchlauf_XL = 1 To 1
Select Case liDurchlauf_XL
Case 1
'trage hier deine richtigen Pfade + Dateinamen ein
Call NeueXLSitzung("M:\Koblenz\Projects\Statistik\Arbeitshilfe_DMS\ArbAwKoblenz\Abgabe Bea\Abgabe BEA.xls")
End Select
Next
Application.WindowState = xlMaximized
ThisWorkbook.Windows(1).WindowState = xlMaximized
'Application.Wait Now + TimeSerial(0, 0, 3)
ThisWorkbook.Activate
Application.Wait Now + TimeSerial(0, 0, 2)
ThisWorkbook.Close
End Sub
Sub NeueXLSitzung(ByVal neuxl As String)
Dim appXL As Excel.Application
Dim wkb As Workbook
Set appXL = New Excel.Application
Set wkb = appXL.Workbooks.Open(neuxl)
appXL.Visible = True
Set appXL = Nothing
Set wkb = Nothing
End Sub
Leider bleibt aber plötzlich mein Makro bei
Set wkb = appXL.Workbooks.Open(neuxl)
mit der Meldung "Die Methode 'Open' für das Objekt 'Workbooks' ist fehlgeschlagen" hängen.
Ich habe aber nix geändert an meinem Makro?!
Kann mir da jemand helfen?
Gruß und Danke
Werner