>> Listbox selection

G

Guest

Hi, I have a listbox on a worksheet. When a user selects an item in the
listbox I perform an bunch of routines that updates the worksheet based on
the selection.

The problem is that the selected item only appears highlighted when I change
to another worksheet and then return. Switching worksheets has to be a manual
process for this to work; plus I want all the other worksheets hidden.

I have checked and the process does not repeat. I have tried a work-around
by storing the listbox.listindex before running any routine and then setting
the listbox.listindex to the stored value. I have tried using
application.screenupdating=true. No joy with any of these.

So any ideas why I need to use a manual move away and then return to
worksheet to see a highlighted selected item in the list? Any ideas to
resolve this so that users are not confused about their selection?

Many thanks,
Jonathan
 
B

Bob Phillips

I can't say that I have experienced it, but you could try this in your
routines

activecell.Activate

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

Thanks Bob. I have just given your suggestion a go. I still have to switch
worksheets and return for the item to appear highlighted.

Many thanks
Jonathan
 
M

michael.beckinsale

Jonathan,

Try putting

DoEvents

in the code before activating the worksheet / cell

Regards

Michael Beckinsale
 
G

Guest

Hi Michael, thanks for the suggestion. Have given it a go to no avail.

Many thanks,
Jonathan
 

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