if not isempty combobox does not work ?

P

Pierre

Hi,

I have the following piece of code for two comboboxes in a userform;

If Not IsEmpty(zoekwg.Value) Then
'This Combobox was selected
klantkeuze = zoekwg.Value
Set klantmatrix =
Worksheets("datadga").Range("B2:b500").Find(klantkeuze)
ElseIf Not IsEmpty(zoekdga.Value) Then
'Combobox2 was selected
klantkeuze = zoekdga.Value
Set klantmatrix =
Worksheets("datadga").Range("B2:b500").Find(klantkeuze)
End If

If box1 is empty then it should look if there is something in box2
However, allthough I put nothing in box1, it still sees it as NOT empty !

The code for filling the boxes is;

zoekdga.RowSource = "B2:B1000"
zoekwg.RowSource = "B1:FX1000"

I would like to have the first piece of code check if the user has input
something in box1. If the user didn't it should do the same in box2.

Any suggestions?
Thanks,
Pierre
 
P

Pierre

Hi Joel,

djee....that was simple.
Sorry for making it so troublesome.
Thanks for your help,
Pierre
 

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