Hi guys,
I'm desperately trying to resolve type mismatch error but no results. Any tips?
This button is supposed to copy all data from actual worksheet/table (SourceTable) to the end of summary table (DestinationTable) in other sheet.
Private Sub CommandButton1_Click()
Dim SourceTable, DestinationTable As ListObject
Set SourceTable = ActiveSheet.ListObjects("ZN")
Set DestinationTable = Sheets("Zbirni").ListObjects("ZBIRNI")
SourceTable.DataBodyRange.Copy Destination:=DestinationTable.DataBodyRange.Offset(DestinationTable.DataBodyRange.Rows.Count).Resize(1, 1).PasteSpecial(SourceTable).xlPasteValues
End Sub
I'm desperately trying to resolve type mismatch error but no results. Any tips?
This button is supposed to copy all data from actual worksheet/table (SourceTable) to the end of summary table (DestinationTable) in other sheet.
Private Sub CommandButton1_Click()
Dim SourceTable, DestinationTable As ListObject
Set SourceTable = ActiveSheet.ListObjects("ZN")
Set DestinationTable = Sheets("Zbirni").ListObjects("ZBIRNI")
SourceTable.DataBodyRange.Copy Destination:=DestinationTable.DataBodyRange.Offset(DestinationTable.DataBodyRange.Rows.Count).Resize(1, 1).PasteSpecial(SourceTable).xlPasteValues
End Sub