I have an invoice, where user can fill a few lines like quantity, description, price.
Of course there is only one total
How do I get all the lines with descriptions etc, copied to the summary file?
I have a piece of working code, but this only copies the lines which is most down. (I transfer the filled in cells a couple of rows down, to one row of data.)
Hope someone understands what I an trying to do. If not, please let me know..
Anyway, this is the code I have:
Of course there is only one total
How do I get all the lines with descriptions etc, copied to the summary file?
I have a piece of working code, but this only copies the lines which is most down. (I transfer the filled in cells a couple of rows down, to one row of data.)
Hope someone understands what I an trying to do. If not, please let me know..
Anyway, this is the code I have:
Code:
Private Sub Inboeken_Click()
Dim objDoel As Object
Dim fPath As String
wbPath = ThisWorkbook.Path
Set objDoel = Workbooks.Open(wbPath & "\omzetlijst.xls")
With objDoel
.Worksheets("Facturatie").Cells(Rows.Count, "F").End(xlUp).Offset(1, -5).Resize(1, 13).Value = ThisWorkbook.Worksheets("Blad1").Cells(Rows.Count, "A").End(xlUp).Resize(1, 13).Value
.Save
.Close
End With
Application.Dialogs(xlDialogPrint).Show
Range("A11:d18").ClearContents
Range("C5").NumberFormat = "@"
Range("C5").Value = Range("C5").Value + 1
Range("C5").NumberFormat = "@"
Range("A11").Select
End Sub