I assume you mean that tb_Data is a listbox or a combobox, rather than a
textbox? I don't think you can do what you want to do with a textbox.
For a listbox, you need to scan through and find the selected lines.
Google will find you information on doing it. The following link
http://www.ozgrid.com/forum/showthread.php?t=37103 is a good example. Just
call your macro, instead of putting the indexes into an array.