ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox Column Count and Width Dont work. Seems Easy (https://www.excelbanter.com/excel-programming/363563-listbox-column-count-width-dont-work-seems-easy.html)

Brandon Johnson

Listbox Column Count and Width Dont work. Seems Easy
 
I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.


Giles B[_2_]

Listbox Column Count and Width Dont work. Seems Easy
 
put semi-colons between each width:

0.75;0.75;0.75 etc.

"Brandon Johnson" wrote:

I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.



Tom Ogilvy

Listbox Column Count and Width Dont work. Seems Easy
 
Point (pt) is the default - but I don't think you want .75 - perhaps 75.

75;75;75;75;75;75;75;75;75;75;75;75;75

--
Regards,
Tom Ogilvy


"Brandon Johnson" wrote:

I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.



Brandon Johnson

Listbox Column Count and Width Dont work. Seems Easy
 
ok i did that and added this code and it showed just blanks all the way
down. A() is an array. it would be helpful to use the .column property
but i dont know how to use that correctly so im using this. its still
not working though. any thoughts

lstResults.AddItem A(1) & ";" & A(2) & ";" & A(3) & ";" & _
A(4) & ";" & A(5) & ";" & A(6) & ";" & A(7) & ";" & A(8) &
_
";" & A(9) & ";" & A(10) & ";" & A(11) & ";" & A(12) & ";"
& A(13)

Giles B wrote:
put semi-colons between each width:

0.75;0.75;0.75 etc.

"Brandon Johnson" wrote:

I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.




Brandon Johnson

Listbox Column Count and Width Dont work. Seems Easy
 
ok tom that helped like big time. thankyou. i still have problem with
seperating them into different column now. thanks for the boost in
headway.

Brandon Johnson wrote:
ok i did that and added this code and it showed just blanks all the way
down. A() is an array. it would be helpful to use the .column property
but i dont know how to use that correctly so im using this. its still
not working though. any thoughts

lstResults.AddItem A(1) & ";" & A(2) & ";" & A(3) & ";" & _
A(4) & ";" & A(5) & ";" & A(6) & ";" & A(7) & ";" & A(8) &
_
";" & A(9) & ";" & A(10) & ";" & A(11) & ";" & A(12) & ";"
& A(13)

Giles B wrote:
put semi-colons between each width:

0.75;0.75;0.75 etc.

"Brandon Johnson" wrote:

I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.




Tom Ogilvy

Listbox Column Count and Width Dont work. Seems Easy
 
with lstResults
.AddItem A(1)
for j = 2 to 13
.list(.listcount - 1, j - 1) = A(j)
Next
End With

--
Regards,
Tom Ogilvy


"Brandon Johnson" wrote:

ok tom that helped like big time. thankyou. i still have problem with
seperating them into different column now. thanks for the boost in
headway.

Brandon Johnson wrote:
ok i did that and added this code and it showed just blanks all the way
down. A() is an array. it would be helpful to use the .column property
but i dont know how to use that correctly so im using this. its still
not working though. any thoughts

lstResults.AddItem A(1) & ";" & A(2) & ";" & A(3) & ";" & _
A(4) & ";" & A(5) & ";" & A(6) & ";" & A(7) & ";" & A(8) &
_
";" & A(9) & ";" & A(10) & ";" & A(11) & ";" & A(12) & ";"
& A(13)

Giles B wrote:
put semi-colons between each width:

0.75;0.75;0.75 etc.

"Brandon Johnson" wrote:

I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.





Andy Pope

Listbox Column Count and Width Dont work. Seems Easy
 
Hi,

Even with the correct syntax I think you will have problems with
exceeding the limits of the control.

The help file say;
"Setting ColumnCount to 0 displays zero columns, and setting it to -1
displays all the available columns. For an unbound data source, there is
a 10-column limit (0 to 9)."

Cheers
Andy

Brandon Johnson wrote:
ok i did that and added this code and it showed just blanks all the way
down. A() is an array. it would be helpful to use the .column property
but i dont know how to use that correctly so im using this. its still
not working though. any thoughts

lstResults.AddItem A(1) & ";" & A(2) & ";" & A(3) & ";" & _
A(4) & ";" & A(5) & ";" & A(6) & ";" & A(7) & ";" & A(8) &
_
";" & A(9) & ";" & A(10) & ";" & A(11) & ";" & A(12) & ";"
& A(13)

Giles B wrote:

put semi-colons between each width:

0.75;0.75;0.75 etc.

"Brandon Johnson" wrote:


I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.





--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Tom Ogilvy

Listbox Column Count and Width Dont work. Seems Easy
 
Andy is correct (I was under the impression they had fixed this) - see my
answer to your later post for a work around.

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote:

with lstResults
.AddItem A(1)
for j = 2 to 13
.list(.listcount - 1, j - 1) = A(j)
Next
End With

--
Regards,
Tom Ogilvy


"Brandon Johnson" wrote:

ok tom that helped like big time. thankyou. i still have problem with
seperating them into different column now. thanks for the boost in
headway.

Brandon Johnson wrote:
ok i did that and added this code and it showed just blanks all the way
down. A() is an array. it would be helpful to use the .column property
but i dont know how to use that correctly so im using this. its still
not working though. any thoughts

lstResults.AddItem A(1) & ";" & A(2) & ";" & A(3) & ";" & _
A(4) & ";" & A(5) & ";" & A(6) & ";" & A(7) & ";" & A(8) &
_
";" & A(9) & ";" & A(10) & ";" & A(11) & ";" & A(12) & ";"
& A(13)

Giles B wrote:
put semi-colons between each width:

0.75;0.75;0.75 etc.

"Brandon Johnson" wrote:

I have 13 columns id like to add. so i set the column count to 13 and
column bound to 0. I then put in 0.75 pt in the column width. How ever
do i do that 13 times or what do i do? can someone help please.






All times are GMT +1. The time now is 04:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com