1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Sub x()
Dim arr(5) As Variant
Dim RanFree As Integer
Dim wks As Workbook
'**************************************
'*** Hier muß dein Drucken Code hin ***
'**************************************
arr(0) = [E2]
arr(1) = [I2].Text
arr(2) = [D5]
arr(3) = [I5]
arr(4) = [D7]
arr(5) = [I7]
Set wks = Workbooks.Open("C:\Muster\Auswertung.xls") ' <--- Pfad anpassen
RanFree = wks.Worksheets(1).Range("A65536").End(xlUp).Row + 1
wks.Worksheets(1).Cells(RanFree, 1) = arr(0)
wks.Worksheets(1).Cells(RanFree, 2) = arr(0)
wks.Worksheets(1).Cells(RanFree, 3) = arr(1)
wks.Worksheets(1).Cells(RanFree, 4) = arr(2)
wks.Worksheets(1).Cells(RanFree, 5) = arr(3)
wks.Worksheets(1).Cells(RanFree, 6) = arr(4)
wks.Worksheets(1).Cells(RanFree, 7) = arr(5)
wks.Save
wks.Close
End Sub |