Value of a controlbox (Excel Userform)


Posted by Auvo Sarmanto on November 14, 2001 1:07 AM

I want to clear the values of set of control boxes in a UserForm by using VB.

The simple assignment
ControlBoxi = False
affects only some of the control boxes and leaves the rest untouched.

Is there a bug in the VB?



Posted by Juan Pablo on November 14, 2001 6:04 AM

By "clear" you mean unselect everything ? leave the ComboBox "blank" or remove all items ?

ComboBox1.Clear 'This removes all items from the combobox.

ComboBox1.ListIndex = -1 'This "unselects" anything, and puts a blank space in it.

Juan Pablo