Run-time error '380'

G

Guest

Hi,
I have a userform with a combobox on it. Upon activation I want it to have
the value from a cell on the worksheet. However sometimes the below code
works and sometimes not:

ComboBox1.Value = Sheets("Brand_Data").Range("A1").Value

I get the "Could not set the Value Property. Invalid proderty value"
message. However when I reset and load the userfrom again it always works...
can anyone make sense of it?

Thanks,
Ozgur
 
N

NickHK

I would guess the text of "Sheets("Brand_Data").Range("A1").Value" is not in
the list of the combobox and the combobox.Style is set to
2-fmStyleDropDownList.
This mean the user is limited to selecting values from the list and that you
must set the combobox.Value to a list value.

NickHK
 

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