Which User Form Listbox selection just checked?

D

Don Wiss

I'm using xl2002. I have a User Form with a ListBox. The ListBox's
MultiSelect is set to Multi. I have a ListBox_Change event. Inside this
macro how can I tell which of the selections was the one just checked?

Thanks, Don <www.donwiss.com> (e-mail link at home page bottom).
 
A

Alok

Hi,
Sheet1.ListBox1.List(ListBox1.ListIndex) will give you the last selection
that was checked.
Alok
 
B

baj

Hi,

Isn't it possible to store the listindex in seperate factor everytime
you make a selection ?
In that way you always have the last selection...

Bye Baj
 
D

Don Wiss

Isn't it possible to store the listindex in seperate factor everytime
you make a selection ?
In that way you always have the last selection...

I was thinking of that as an alternative.

The reason for this is one of the selections is Entire State. All the
others are territories. When they pick Entire State I'd like to clear all
the territories automatically. It works, but you can't then click a
territory, unless you unclick Entire State first. But maybe such behavior
isn't so bad.

Thanks, Don <www.donwiss.com> (e-mail link at home page bottom).
 

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