Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Syntax To Update ComboBox List From TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Syntax To Update ComboBox List From TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Syntax To Update ComboBox List From TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Syntax To Update ComboBox List From TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Syntax To Update ComboBox List From TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Syntax To Update ComboBox List From TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Syntax To Update ComboBox List From TextBox

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for selecting a textbox within a chart? tenlbham Charts and Charting in Excel 4 April 25th 07 02:39 AM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:47 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:43 PM
Userform: Textbox changing with selection in combobox (list) NorTor[_3_] Excel Programming 3 June 8th 04 10:19 PM
Help with Syntax UserForm TextBox John Wilson Excel Programming 1 July 28th 03 04:15 PM


All times are GMT +1. The time now is 01:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"