check if any item selected on listbox

S

Silvester

I have an A2000 Listbox1 with rowsource set to table. I have a button that
copys item selected to another listbox Listbox2.

How do I test for and ensure that an item is selected in Listbox 1 before
allowing the code on btnCopy to run ?
 
G

Gerald Stanley

If the ListIndex = -1 then nothing has been selected.

Hope This Helps
Gerald Stanley MCSD
 
Top