ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox Alignment Help (https://www.excelbanter.com/excel-programming/338811-listbox-alignment-help.html)

justchris[_6_]

Listbox Alignment Help
 

Hi, I need to find out if theres a way I can align text in a list box.

Heres How im filling the text box....


Code:
--------------------
set Daily = worksheets("Daily")

with userform1.listbox1
.additem daily.cells(x, 1) & " " & daily.cells (1, x) & " " & Daily.cells(x, x)
end with
--------------------



There are basicaly 3 colums.
I need the left aligned to the left of the listbox, center to the
center, and right to the right. I'm not sure on this one so I thought
I'd throw it out there and see if its possable.

Thanks in Advance!!
Chris :cool:


--
justchris
------------------------------------------------------------------------
justchris's Profile: http://www.excelforum.com/member.php...fo&userid=8894
View this thread: http://www.excelforum.com/showthread...hreadid=400729


Mangesh Yadav[_4_]

Listbox Alignment Help
 
check the properties for the listbox. Select the box, right-click
properties. Check if there is any such property (I couldn't find one).

Mangesh



"justchris" wrote
in message ...

Hi, I need to find out if theres a way I can align text in a list box.

Heres How im filling the text box....


Code:
--------------------
set Daily = worksheets("Daily")

with userform1.listbox1
.additem daily.cells(x, 1) & " " & daily.cells (1, x) & " " &

Daily.cells(x, x)
end with
--------------------



There are basicaly 3 colums.
I need the left aligned to the left of the listbox, center to the
center, and right to the right. I'm not sure on this one so I thought
I'd throw it out there and see if its possable.

Thanks in Advance!!
Chris :cool:


--
justchris
------------------------------------------------------------------------
justchris's Profile:

http://www.excelforum.com/member.php...fo&userid=8894
View this thread: http://www.excelforum.com/showthread...hreadid=400729




Tom Ogilvy

Listbox Alignment Help
 
the listboxes in Excel do not provide this type of functionality. In your
example however, you are putting all you data in a single column. Your
options there would be to use a monospaced font and pad the intervals
between you data items so it is aligned.

You could use functions like Len, Space and other string function to
calculate and build the string you want.

--
Regards,
Tom Ogilvy

"justchris" wrote
in message ...

Hi, I need to find out if theres a way I can align text in a list box.

Heres How im filling the text box....


Code:
--------------------
set Daily = worksheets("Daily")

with userform1.listbox1
.additem daily.cells(x, 1) & " " & daily.cells (1, x) & " " &

Daily.cells(x, x)
end with
--------------------



There are basicaly 3 colums.
I need the left aligned to the left of the listbox, center to the
center, and right to the right. I'm not sure on this one so I thought
I'd throw it out there and see if its possable.

Thanks in Advance!!
Chris :cool:


--
justchris
------------------------------------------------------------------------
justchris's Profile:

http://www.excelforum.com/member.php...fo&userid=8894
View this thread: http://www.excelforum.com/showthread...hreadid=400729




Tom Ogilvy

Listbox Alignment Help
 
I was also going to say, in the past, in answer to a similar question, a
Listview control has been suggested.

http://tinyurl.com/c4edf

--
Regards,
Tom Ogilvy

"justchris" wrote
in message ...

Hi, I need to find out if theres a way I can align text in a list box.

Heres How im filling the text box....


Code:
--------------------
set Daily = worksheets("Daily")

with userform1.listbox1
.additem daily.cells(x, 1) & " " & daily.cells (1, x) & " " &

Daily.cells(x, x)
end with
--------------------



There are basicaly 3 colums.
I need the left aligned to the left of the listbox, center to the
center, and right to the right. I'm not sure on this one so I thought
I'd throw it out there and see if its possable.

Thanks in Advance!!
Chris :cool:


--
justchris
------------------------------------------------------------------------
justchris's Profile:

http://www.excelforum.com/member.php...fo&userid=8894
View this thread: http://www.excelforum.com/showthread...hreadid=400729





All times are GMT +1. The time now is 06:41 PM.

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