0

Is there any way to paste a table into a Userform? I found this post by @Dirk Horsten which captures the columns.

Private Sub TextBox1_Change()
Dim splitText
splitText = Split(Me.TextBox1.Value, vbTab)
If UBound(splitText) > LBound(splitText) Then
    Me.TextBox1.Value = splitText(LBound(splitText))
    Me.TextBox2.Value = splitText(LBound(splitText) + 1)
    Me.TextBox3.Value = splitText(LBound(splitText) + 2)
    Me.TextBox4.Value = splitText(LBound(splitText) + 3)
End If
End Sub

However, my table has more than one rows. Any ideas?

Cheers.

Geo Koro
  • 75
  • 6
  • As it seems you want to display a matrix, you could assign the listobject's entire `.DataBodyRange` to a **ListBox** 'es `.List` property as array. See [Populate listbox with multiple columns](https://stackoverflow.com/questions/47528558/vba-excel-populate-listbox-with-multiple-columns/47531440#47531440) to get the idea :-) – T.M. Mar 27 '21 at 16:58
  • 1
    Thank you!! I missed that post. – Geo Koro Mar 27 '21 at 17:26

0 Answers0