0

I wish to transfer data from a TextBox into a ListBox

Private Sub CommandButton3_Click()
Dim i As Long
i = Me.ListBox1.ListCount = 1
With ListBox1
.AddItem Me.TextBox1
.List(i + 1, 1) = Me.TextBox2
.List(i + 1, 2) = Me.TextBox3
.List(i + 1, 3) = Me.TextBox2
.List(i + 1, 4) = Me.TextBox2
End With
End Sub

But my issue is that it yields Run-time error 70. Permission Denied. Will be very grateful if someone can help me. Thanks in advance.

Tosh
  • 135
  • 1
  • 9

0 Answers0