Columns in List box, when inserting text from text box (VBA) 
Author Message
 Columns in List box, when inserting text from text box (VBA)

I have a list box that I am trying to insert text from
various text boxes that users will fill in.  I know how to
do this, this issue I am having is the quanity of text
boxes (text) that I am inseting in to the list box.  I can
insert text from 10 text boxes.  In the list box they will
be columns 0-9.  The minute I try to add one more for
column 11 it errors out and here is the message:

Could not set the list property.  Invalid property value.

Now, the only change needed in the insert code is the
column that it is placing the information from the
textbox.  If I rem out insert #11 it will bomb on 12
(which is now 11).  I have list box set to 14 columns.  
But I can not insert textbox information past column 10.

Any help would be appreciated. I just do not get it.  It
will work all day long up to 10 columns just not over
that.  I have looked to see if there is a list box column
limit and to see if there is a character limit for a list
box that will hold me back.  I can find nothing that would
lead me to that conclusion.

Thanks if you can help.  Any Ideas would be helpfull.  I
will even take VB sujestions.  They might point me in the
right direction.  



Mon, 15 Nov 2004 01:37:29 GMT  
 Columns in List box, when inserting text from text box (VBA)
Hi Carlos,

Quote:
> It
> will work all day long up to 10 columns just not over
> that.  I have looked to see if there is a list box column
> limit and to see if there is a character limit for a list
> box that will hold me back.  I can find nothing that would
> lead me to that conclusion.

Except the behavior you're seeing... I'd guess that 10
columsn is the limit.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)



Mon, 15 Nov 2004 16:02:38 GMT  
 Columns in List box, when inserting text from text box (VBA)
Hi Carlos, Cindy,

I don't think it's a problem with a limit on the number of columns in
ListBox - the following loads data into 20,000 columns - stopped testing
after that. Carlos: can you show us the code you're using to load the
ListBox.

--------------------------------------------
Dim myArray(19999, 0) As String
Dim i As Long

For i = 0 To 19999
    myArray(i, 0) = CStr(i)
Next i

ListBox1.ColumnCount = 20000
ListBox1.Column = myArray
--------------------------------------------

Hope this helps.
ibby

Please post replies or follow-ups to the **newsgroup** so that participants
may benefit or contribute.



Quote:
> Hi Carlos,

> > It
> > will work all day long up to 10 columns just not over
> > that.  I have looked to see if there is a list box column
> > limit and to see if there is a character limit for a list
> > box that will hold me back.  I can find nothing that would
> > lead me to that conclusion.

> Except the behavior you're seeing... I'd guess that 10
> columsn is the limit.

> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister
> http://www.mvps.org/word
> http://go.compuserve.com/MSOfficeForum

> This reply is posted in the Newsgroup; please post any follow
> question or reply in the newsgroup and not by e-mail :-)



Mon, 15 Nov 2004 21:10:06 GMT  
 Columns in List box, when inserting text from text box (VBA)
Hi Ibby

I've had  problems loading an array into a listbox with 11 or 12 columns.
Word 97/Win98. When testing the code below - it works and the columns are
all visible. . Before posting this I also tested the code on a combobox and
it works.

Somehow I have a feeling there must be some circumstances under which the
problem occurs.

'Works just fine when testing
'Column count set in the userform
Dim aBig(24, 15) As String
Dim i As Long
Dim j As Long
For i = 0 To 24
    For j = 0 To 15
        aBig(i, j) = "Any - " & j
    Next
Next

ListBox1.List = aBig

--
/Anna Bohman
Bra Utbildning AB, Sweden

http://www.buab.se
-------------------------------------------------------------------------


Quote:
> Hi Carlos, Cindy,

> I don't think it's a problem with a limit on the number of columns in
> ListBox - the following loads data into 20,000 columns - stopped testing
> after that. Carlos: can you show us the code you're using to load the
> ListBox.

> --------------------------------------------
> Dim myArray(19999, 0) As String
> Dim i As Long

> For i = 0 To 19999
>     myArray(i, 0) = CStr(i)
> Next i

> ListBox1.ColumnCount = 20000
> ListBox1.Column = myArray
> --------------------------------------------

> Hope this helps.
> ibby

> Please post replies or follow-ups to the **newsgroup** so that
participants
> may benefit or contribute.



> > Hi Carlos,

> > > It
> > > will work all day long up to 10 columns just not over
> > > that.  I have looked to see if there is a list box column
> > > limit and to see if there is a character limit for a list
> > > box that will hold me back.  I can find nothing that would
> > > lead me to that conclusion.

> > Except the behavior you're seeing... I'd guess that 10
> > columsn is the limit.

> > Cindy Meister
> > INTER-Solutions, Switzerland
> > http://homepage.swissonline.ch/cindymeister
> > http://www.mvps.org/word
> > http://go.compuserve.com/MSOfficeForum

> > This reply is posted in the Newsgroup; please post any follow
> > question or reply in the newsgroup and not by e-mail :-)



Mon, 15 Nov 2004 22:48:31 GMT  
 Columns in List box, when inserting text from text box (VBA)
Hi Anna,

Quote:
> I've had  problems loading an array into a listbox with 11 or 12 columns.
> Word 97/Win98. When testing the code below - it works and the columns are
> all visible. . Before posting this I also tested the code on a combobox
and
> it works.

> Somehow I have a feeling there must be some circumstances under which the
> problem occurs.

Yep - sure seems that way - would be interesting to see Carlos's code.

--
ibby

Please post replies or follow-ups to the **newsgroup** so that participants
may benefit or contribute.



Mon, 15 Nov 2004 23:52:29 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Limiting Access to Text Boxes, List Boxes and Combo Boxes

2. Text box text on new page text box

3. Rich Text box displaying last inserted text?

4. Insert text into text box on current position

5. Insert text at the insertion point within a text box

6. Inserting text into an HTML text box

7. enter two columns of text to a text or edit box

8. help: Implementing a list box using a unbound text box

9. Displaying Records in List Box as Data is input to Text Box on Form

10. List box search based on text box entry...

11. Update Text Box from List Box

12. Resizing a Rich Text Box and a List Box

 

 
Powered by phpBB® Forum Software