kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
I used this code for my listbox click event. When it sends data to the textboxes, it places the data in the first column in Reg2 instead of Reg1. How do i get my data in place????
Thanks in advance
Code:
Private Sub lstWin_Click()
Dim n As Integer, ac As Integer
With lstWin
For n = 0 To .ListCount - 1
If .Selected(n) Then
For ac = 0 To .ColumnCount - 1
Me.Controls("Reg" & ac + 1).Value = .List(n, ac - 1)
Next ac
End If
Next n
End With
End Sub
Thanks in advance