hi,
I have listbox. When user select item and click add, the value should be add to sheet: one row below where the current field is selected.
How can I do it?
I have listbox. When user select item and click add, the value should be add to sheet: one row below where the current field is selected.
Code:
'Set addme = 'missing code
For x = 0 To Me.lbsourceList.ListCount - 1
If Me.lbsourceList.Selected(x) Then
addme = Me.lbsourceList.List(x)
addme.Offset(0, 1) = Me.lbsourceList.List(x, 1)
addme.Offset(0, 2) = Me.lbsourceList.List(x, 2)
addme.Offset(0, 3) = Me.lbsourceList.List(x, 3)
addme.Offset(0, 4) = Me.lbsourceList.List(x, 4)
addme.Offset(0, 5) = Me.lbsourceList.List(x, 5)
Set addme = addme.Offset(1, 0)
End If
Next x
For y = 0 To Me.lbsourceList.ListCount - 1
If Me.lbsourceList.Selected(y) Then Me.lbsourceList.Selected(y) = False
Next y
How can I do it?