Combo Box

  • Thread starter Thread starter Don Lloyd
  • Start date Start date
D

Don Lloyd

Hi,

How would I cancel the last item selected from a ComboBox.

I've tried using ComboBo1.ListIndex= -1 in the code (with Events disabled)
but this results in recursion followed by failure.

Regards,
Don
 
Declare a public boolean variable at the top of the module:

option explicit
dim blkProc as boolean

sub someclick/changeevent here

if blkproc then exit sub

'more of your code

'get ready to change the combobox

blkproc = true
combobo1.listindex = -1
blkproc = false

''more of your code

end sub

(on a userform????)
 
Hi Don,

It's not clear what is causing the recursion, so can you post your code?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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

Back
Top