Listbox ItemsSelect

R

rm

In the code below lstCtl is with some consistency Null. The code is
contained in a button click event. The button resides on a subform.
lstCtl is Null the first time to button is clicked. On successive
calls the code works as designed. What am I doing wrong?

lstOpenTS.SetFocus
Set frm = Me
Set lstCtl = Me.lstOpenTS

For Each varItm In lstCtl.ItemsSelected
Call writeTSProfile(lstCtl.Column(0, varItm))
Next varItm
 

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