Schönen guten Nachmittag
Also ich habe folgenden Code:
___________________________________________________________
Private Sub Workbook_Open()
varStammordner = ThisWorkbook.Path & ""
Workbooks.Open (varStammordner & Year(Date) & "" & Format(Month(Date), _
"00") & "" & Format(Day(Date), "00") & ".xls")
Workbooks(Workbooks.Count).Charts.Add
With Workbooks(Workbooks.Count).Charts(1)
.ChartType = xlLineMarkers
.SetSourceData Source:=Workbooks(Workbooks.Count).Sheets(Format(Day(Date), _
"00")).Range("A3
" & Workbooks(Workbooks.Count).Sheets(Format(Day(Date), _
"00")).UsedRange.Rows.Count), PlotBy:= _
xlColumns
.Location Where:=xlLocationAsNewSheet
.HasTitle = True
.ChartTitle.Characters.Text = "Messdaten"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
Workbooks(Workbooks.Count).Sheets(1).Move
Workbooks(Workbooks.Count).SaveAs varStammordner & Year(Date) & "" & Format(Month(Date), _
"00") & "" & Format(Day(Date), "00") & " Diagramm.xls"
Workbooks(Workbooks.Count).Close
Workbooks(Workbooks.Count).Saved = True
Workbooks(Workbooks.Count).Close
End Sub
__________________________________________________________
In welchem Teil müsste ich den von dir genannten Code integrieren um das Schließen der Excel Datei zu erreichen??