Copy more than one row in VBA

HV_L

Registered User.
Local time
Today, 07:26
Joined
Dec 23, 2009
Messages
53
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:
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
 

Users who are viewing this thread

Back
Top Bottom