Syntax To Update ComboBox List From TextBox
Hey Dave,
Thanks for the reply.
The row source was set at Initialization with a static named range
(106 columns and 27 rows). When this named range gets changed, I need
to change the row source to reflect the changes.
If I understand your observation, it sounds like I need to first flush
the ComboBox and then reinsert the (changed) named range into the (now
empty) ComboBox row source. And yes, columns are set to ColumnCount.
That is what I was missing.
Thank you.
-Minitman
On Mon, 10 Nov 2008 10:32:09 -0600, Dave Peterson
wrote:
My bet is that you assigned something to the rowsource first--either manually
(via the properties window) or via code.
me.combobox1.rowsource = ""
(or clean up your code/properties setting.)
And you did set the .columncount greater than 1, right?
Minitman wrote:
Greetings,
I am trying to update an item in the ComboBox1 list and get this error
message:
-------------------------------------------------------------------------
Run-time error '70':
Could not set the List property. Permission denied.
-------------------------------------------------------------------------
With this code:
---------------------------------------------------------------------------------------
ComboBox1.List(ComboBox1.ListIndex, 2) = TextBox1.Value
---------------------------------------------------------------------------------------
When I run this MsgBox
---------------------------------------------------------------------------------------
MsgBox "TextBox1 = " & TextBox1 & " and ComboBox1 = " _
& ComboBox1.List(ComboBox1.ListIndex, 2)
---------------------------------------------------------------------------------------
Just above the line of code that chokes, it shows that the ComboBox
and the TextBox have the same value.
What do I need to do to fix this code?
Any help is appreciated.
-Minitman
|