I hv 2 listboxes on userform..
If user is selecting the text of listbox1 then
get its index and select the text of listbox2(index of listbox1)
next also remove the selected item from both listboxes on clicking remove btn.
I hv 2 listboxes on userform..
If user is selecting the text of listbox1 then
get its index and select the text of listbox2(index of listbox1)
next also remove the selected item from both listboxes on clicking remove btn.
Private Sub cmdRemove_Click()
Range("A1").Offset(ListBox1.ListIndex).Delete
Range("B1").Offset(ListBox1.ListIndex).Delete
End Sub
Private Sub ListBox1_Click()
ListBox2.ListIndex = ListBox1.ListIndex
End Sub
This assumes that the source of the listboxes is A1:A10, B1:B10
--
HTH
Bob Phillips
"ilyaskazi" <[email protected]> wrote
in message news:[email protected]...
>
> I hv 2 listboxes on userform..
>
> If user is selecting the text of listbox1 then
> get its index and select the text of listbox2(index of listbox1)
> next also remove the selected item from both listboxes on clicking
> remove btn.
>
>
> --
> ilyaskazi
> ------------------------------------------------------------------------
> ilyaskazi's Profile:
http://www.excelforum.com/member.php...o&userid=23969
> View this thread: http://www.excelforum.com/showthread...hreadid=467414
>
Although i wanted the help for userform's listbox, it is solved taking some similar codes
It is perfect as always, Mr Bob.. Thankyou.
i do not want to accept any item in listbox if it is already existing
show msgbox of already exist
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks