VB/WinCCflexble: Excel beenden ?

Fluffi

Level-2
Beiträge
532
Reaktionspunkte
88
Zuviel Werbung?
-> Hier kostenlos registrieren
Dim objExcelApp


Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.Workbooks.open "C:\temp.xls"
objExcelApp.Visible = True

....

objExcelApp.ActiveWorkbook.SaveAs "C:\temp.xls"
objExcelApp.Workbooks.Close
objExcelApp.Quit
Set objExcelApp = Nothing



Warum bleibt Excel immer noch auf und die Datei temp.xls auch ?
Wie kann ich beides getrennt beenden ?
 
Hallo,
bei mir sieht die End-Sequenz etwas anders aus :
Code:
wenn ich unter einem neuen Datei-Namen abspeichern will :
 
[COLOR=blue]objExcelApp.ActiveWorkbook.SaveAs "C:\temp.xls" , true
objExcelApp.Workbooks.Close false
objExcelApp.Quit
[/COLOR]
wenn ich den ursprünglichen Namen behalten will :
 
[COLOR=green]objExcelApp.Workbooks.Close true
objExcelApp.Quit
[/COLOR]

Vielleicht kommst du damit ja etwas weiter ...

Gruß
LL
 
Zurück
Oben