Dependant Command Box

mhudsora

New Member
Joined
Sep 26, 2010
Messages
10
Hello all,
Simple example:

  • I have two command boxes on a userform
  • I have populated those command boxes with the value: "apples" and "oranges"
  • The user selects "apples" in the first command box
  • How do i remove the value "apples" from the second command box?
Thanks!
mhudsora
 

mhudsora

New Member
Joined
Sep 26, 2010
Messages
10
Getting weird runtime error from code that should work:

For x = 0 To (ufEditValue.cbValue1.ListCount - 1)
If ufEditValue.cbValue1.List(x) = ufEditValue.cbValue2 Then ufEditValue.cbValue1.RemoveItem (x): Exit For
Next x

Runtime error is as follows:

Excel run-time error '-2147467259(80004005)'
Unspecified error

Any help would be great, Thanks!
 

Forum statistics

Threads
1,084,859
Messages
5,380,326
Members
401,665
Latest member
iahmad

Some videos you may like

This Week's Hot Topics

Top