Private Sub CommandButton1_Click()
'Set ff = ThisWorkbook.Worksheets("filtra")
With UserForm27.ListBox1
ColVisu = Array(1, 2, 6)
End With
With UserForm27.ListBox1
v = .List
Dim result As Variant
Dim Tbl()
For i = 0 To UBound(v)
'v(i, 1) = Format(v(i, 1), "dd/mm/yyyy")
'v(i, 1) = Format(CDate(v(i, 1)), "dd/mm/yyyy")
found = True
n = n + 1: ReDim Preserve Tbl(1 To UBound(v, 2), 1 To n)
c = 0
For Each k In ColVisu
v(i, 1) = CDate(v(i, 1))
c = c + 1: Tbl(c, n) = v(i, k)
Next k
Next
End With
With f
'.Range("A3").Resize(UBound(Tbl) + 1, 3).Value = Application.Transpose(Tbl)
Range("K2").Resize(UBound(Tbl, 2), UBound(Tbl, 1)) = Application.Transpose(Tbl)
End With
End Sub
Private Sub CommandButton2_Click()
Unload UserForm27
End Sub
Private Sub UserForm_Initialize()
Dim arr
Set f = ThisWorkbook.Worksheets("movimenti")
f.Columns("B:B").NumberFormat = "dd/mm/yyyy"
With f
arr = f.Range("A2:G" & f.[A65000].End(xlUp).Row).Value
End With
With UserForm27.ListBox1
.List = arr
.ColumnCount = 7
.ColumnWidths = "30; 50; 60; 150; 60; 60; 70"
End With