Sub CommandButton1_Click() 'Importieren ChDrive ("m:") ChDir ("\tzsb\kolltest\2006\rohdaten\") 'Wichtige Info für DTH: hier Verzeichnis ändern Call Directory End Sub Sub Directory() Dim feld(1, 256) As String Dim anfang, ende As Integer Dim file As String feld(1, 1) = Dir("*", vbDirectory) For i = 2 To 256 feld(1, i) = Dir If feld(1, i) = "" Then Exit For Next i anfang = 3 ende = i - 1 For i = anfang To ende file = feld(1, i) Workbooks.OpenText FileName:=file, Origin:= _ xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=True, _ Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _ Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), _ Array(9, 1), Array(10, 1), Array(11, 1)) Call Auswertung Next i End Sub Sub CommandButton3_Click() 'Schließen End End Sub Sub Auswertung() Dim mini As Double Worksheets(1).Range("A:A,B:B,C:C,F:F,K:K").Select Charts.Add ActiveChart.ChartType = xlXYScatterSmoothNoMarkers ActiveChart.SetSourceData Source:=Worksheets(1).Range("A:C,F:F,K:K"), PlotBy _ :=xlColumns ActiveChart.Location Where:=xlLocationAsNewSheet With ActiveChart.Axes(xlCategory) .HasMajorGridlines = True .HasMinorGridlines = False End With With ActiveChart.Axes(xlValue) .HasMajorGridlines = True .HasMinorGridlines = False End With ActiveChart.PlotArea.Select With Selection.Border .Weight = xlThin .LineStyle = xlAutomatic End With Selection.Interior.ColorIndex = xlAutomatic With ActiveChart.Axes(xlValue) .MinimumScaleIsAuto = True .MaximumScale = 100 .MinorUnitIsAuto = True .MajorUnitIsAuto = True .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear End With mini = Worksheets(1).Cells(1, 1) With ActiveChart.Axes(xlCategory) .MinimumScale = mini .MaximumScaleIsAuto = True .MinorUnitIsAuto = True .MajorUnitIsAuto = True .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear End With ActiveChart.SeriesCollection(4).Select ActiveChart.SeriesCollection(4).AxisGroup = 2 End Sub Private Sub Label1_Click() MsgBox ("Grüße an alle Mitarbeiter des TZSB!") End Sub Private Sub UserForm_Click() End Sub