Thema Datum  Von Nutzer Rating
Antwort
Rot Excel wird von Outlook geöffnet, schliesst sich aber nicht nach Beendigung der Prozedur
18.03.2011 15:52:29 Gast23785
NotSolved
18.03.2011 16:22:59 Severus
NotSolved
18.03.2011 17:16:42 Gast90444
NotSolved
18.03.2011 18:05:57 Severus
NotSolved
18.03.2011 18:19:56 Gast11463
NotSolved
18.03.2011 18:25:53 Gast63116
NotSolved
18.03.2011 18:30:17 Gast13007
NotSolved
18.03.2011 19:10:51 Severus
NotSolved
20.03.2011 18:55:42 Gast13321
NotSolved
20.03.2011 20:18:00 Severus
NotSolved
20.03.2011 21:12:07 Gast81442
NotSolved
20.03.2011 21:30:14 Severus
NotSolved
20.03.2011 22:06:18 Gast18780
NotSolved
20.03.2011 22:38:15 Severus
NotSolved

Ansicht des Beitrags:
Von:
Gast23785
Datum:
18.03.2011 15:52:29
Views:
2175
Rating: Antwort:
  Ja
Thema:
Excel wird von Outlook geöffnet, schliesst sich aber nicht nach Beendigung der Prozedur

Hallo,


ich habe folgenden Code, der aus Outlook Excel startet und leider bleibt bei mir immer das Excel Programm im TaskManager stehen. Wenn ich Outlook schliesse, schliesst sich auch Excel. Aber ich möchte, dass sich Excel nach der Prozedur beendet, so wie ich es eigentlich im Code schreibe.

 

'Open Excel in case it is not yet open
If excApp Is Nothing Then
   Set excApp = CreateObject("Excel.Application")
   excStart = True
End If

'Get date from cell A2 in workbook1
Set excWkb = excApp.Workbooks.Open(FILE_PATH_TMP & "~tmp_" & olAtt.FileName)
str = excWkb.ActiveSheet.Cells(2, 1)
year = Right(str, 4)
str = Right(str, 4) & "-" & Mid(str, 4, 2) & "-" & Left(str, 2)

'Clear workbook2
Set excWkb2 = excApp.Workbooks.Open(FILE_IMPORT)  
With excWkb2.ActiveSheet
    .Range("A2").Select
    .Range(Selection, Selection.End(xlDown)).Select
    .Range(Selection, Selection.End(xlToRight)).Select
    excWkb2.Application.Selection.ClearContents
    .Range("A2").Select
    excWkb2.Application.CutCopyMode = False
End With

'Copy content from workbook1 to workbook2
excWkb.Activate
With excWkb.ActiveSheet
    .Range("A2").Select
    .Range(Selection, Selection.End(xlDown)).Select
    .Range(Selection, Selection.End(xlToRight)).Select
    excWkb.Application.Selection.Copy
    .Range("A2").Select
    excWkb2.Activate
    'excWkb2.Application.ActiveCell.PasteSpecial
    'excWbk2.ActiveSheet.Range("A2").Select
    excWkb2.Application.ActiveSheet.Paste
    excWkb2.Save
    excWkb.Application.CutCopyMode = False
End With
         
'Closing
excWkb.Close False
excWkb2.Close False
If excStart = True Then excApp.Quit
Set excWkb = Nothing
Set excWkb2 = Nothing
Set excApp = Nothing

 

Vielen Dank


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot Excel wird von Outlook geöffnet, schliesst sich aber nicht nach Beendigung der Prozedur
18.03.2011 15:52:29 Gast23785
NotSolved
18.03.2011 16:22:59 Severus
NotSolved
18.03.2011 17:16:42 Gast90444
NotSolved
18.03.2011 18:05:57 Severus
NotSolved
18.03.2011 18:19:56 Gast11463
NotSolved
18.03.2011 18:25:53 Gast63116
NotSolved
18.03.2011 18:30:17 Gast13007
NotSolved
18.03.2011 19:10:51 Severus
NotSolved
20.03.2011 18:55:42 Gast13321
NotSolved
20.03.2011 20:18:00 Severus
NotSolved
20.03.2011 21:12:07 Gast81442
NotSolved
20.03.2011 21:30:14 Severus
NotSolved
20.03.2011 22:06:18 Gast18780
NotSolved
20.03.2011 22:38:15 Severus
NotSolved