Como puedo hacer una variacion al metodo Array que utilizo para que muestre los valores de datos de una tabla con sus formatos?
Private Sub UserForm_Activate() Lista.Clear With Lista Me.Lista.ColumnCount = 13 End With Call CargarArray End Sub Sub CargarArray() Dim MyArray() As Variant Dim f As Long, c As Long Dim fMax As Long, cMax As Long Dim n As Long n = 1 fMax = nReg(Hoja5, 2, 1) - 1 cMax = 13 ReDim MyArray(1 To n, 1 To cMax) For f = 3 To fMax For c = 1 To cMax MyArray(n, c) = Hoja5.cells(f, c) Next c If n = fMax Then Exit For ReDim Preserve MyArray(1 To n, 1 To cMax) MyArray = Application.WorksheetFunction.Transpose(MyArray) n = n + 1 ReDim Preserve MyArray(1 To cMax, 1 To n) MyArray = Application.WorksheetFunction.Transpose(MyArray) Next f Lista.List = MyArray End Sub
1 Respuesta
Respuesta de Dante Amor
2