The below and attached may help:
Private Sub CommandButton1_Click() Dim nCol As Integer Dim nRow As Integer Dim myArray() As Variant Dim i As Integer Dim j As Integer nCol = 3 nRow = 6 ReDim myArray(1 To nCol, 1 To nRow) For i = 1 To nCol For j = 1 To nRow myArray(i, j) = Me.Controls("TextBox" & ((i - 1) * nRow + j)).Value Next j Next i Range("A1").Resize(nRow, nCol) = Application.Transpose(myArray) End Sub




Reply With Quote