Belleke
Well-Known Member
Hi,
I have this code that works except that the data has to go in the table on sheet 2, this code puts the data under the table.
Thanks.
I have this code that works except that the data has to go in the table on sheet 2, this code puts the data under the table.
Code:
Private Sub Cmd_09_Click()
Set DT = Sheets("Data")
Set NB = Sheets("Nog te betalen")
On Error Resume Next
With DT
ar = .Cells(1).CurrentRegion
ReDim ar1(UBound(ar), 3)
For s = 2 To UBound(ar)
If ar(s, 12) <> "" Then
ar1(t, 0) = ar(s, 1)
ar1(t, 1) = ar(s, 3)
ar1(t, 2) = ar(s, 12)
t = t + 1
End If
Next s
NB.Cells(Rows.Count, "A").End(xlUp).Offset(1).Resize(UBound(ar1) + 1, UBound(ar1, 2) + 1) = ar1
End With
[wis_lst].ClearContents
End Sub