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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top