Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is the file protected? That is what error 70 implies.
"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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey JLGWhiz,
Thanks for the reply. Interesting, but this file is not protected. -Minitman On Mon, 10 Nov 2008 08:21:02 -0800, JLGWhiz wrote: Is the file protected? That is what error 70 implies. "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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I guess you could add stuff to the combobox (don't use the rowsource), then you
can continue to add/change stuff via the code you pasted (via the textbox). Or you could update the worksheet directly and continue using the .rowsource stuff. (I'm not sure which way is better for you.) Minitman wrote: 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 -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not sure either.
How would I add stuff to the ComboBox? The sheet is updated when I leave the UserForm. I am open to any suggestions you are willing to share. Again, thanks for the assistance. -Minitman On Mon, 10 Nov 2008 15:16:50 -0600, Dave Peterson wrote: I guess you could add stuff to the combobox (don't use the rowsource), then you can continue to add/change stuff via the code you pasted (via the textbox). Or you could update the worksheet directly and continue using the .rowsource stuff. (I'm not sure which way is better for you.) Minitman wrote: 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 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could use .additem and loop through the rows. But this won't work if you
really have to have 106 columns. I guess you could add stuff to the worksheet, then update the combobox's rowsource to point to the new range. Minitman wrote: I'm not sure either. How would I add stuff to the ComboBox? The sheet is updated when I leave the UserForm. I am open to any suggestions you are willing to share. Again, thanks for the assistance. -Minitman On Mon, 10 Nov 2008 15:16:50 -0600, Dave Peterson wrote: I guess you could add stuff to the combobox (don't use the rowsource), then you can continue to add/change stuff via the code you pasted (via the textbox). Or you could update the worksheet directly and continue using the .rowsource stuff. (I'm not sure which way is better for you.) Minitman wrote: 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Syntax for selecting a textbox within a chart? | Charts and Charting in Excel | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Userform: Textbox changing with selection in combobox (list) | Excel Programming | |||
Help with Syntax UserForm TextBox | Excel Programming |