hi,
give the folowwing a look
Sub AddToOverview()
Dim wsOverview As Worksheet, emptyRowOverview As Long
Set wsOverview = Worksheets("Overview")
emptyRowOverview = wsOverview.Cells(Rows.Count, "B").End(xlUp).Row + 1 'Give the rownumber of the first empty row
wsOverview.Cells(emptyRowOverview, "A") = Me.Range("E7")
wsOverview.Cells(emptyRowOverview, "B") = Me.Range("E8")
wsOverview.Cells(emptyRowOverview, "C") = Me.Range("E9")
wsOverview.Cells(emptyRowOverview, "D") = Me.Range("E10")
wsOverview.Cells(emptyRowOverview, "E") = Me.Range("E11")
wsOverview.Cells(emptyRowOverview, "F") = Me.Range("E15")
wsOverview.Cells(emptyRowOverview, "G") = Me.Range("E27")
EmptyInputFields
MsgBox "NCR data transported"
End Sub
Sub EmptyInputFields()
Me.Range("E7").ClearContents
Me.Range("E8").ClearContents
Me.Range("E9").ClearContents
Me.Range("E10").ClearContents
Me.Range("E11").ClearContents
Me.Range("E15").ClearContents
Me.Range("E27").ClearContents
End Sub
Sub GetNextNumber()
Dim wsOverview As Worksheet, emptyRowOverview As Long
Set wsOverview = Worksheets("Overview")
emptyRowOverview = wsOverview.Cells(Rows.Count, "B").End(xlUp).Row + 1 'Give the rownumber of the first empty row
Me.Cells(7, "E") = wsOverview.Cells(emptyRowOverview, "A")
End Sub
Bookmarks