Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


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

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


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

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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


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

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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


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

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



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
In Cell alignment, how do I update the default vertical alignment How to update default cell alignment Setting up and Configuration of Excel 2 February 4th 09 02:25 PM
Alignment and format in listbox columns Jim Rech Excel Programming 4 August 25th 05 12:54 PM
Alignment and format in listbox columns Tom Ogilvy Excel Programming 0 August 24th 05 01:05 PM
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) modjoe23 Excel Programming 3 August 18th 05 02:35 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 05:33 AM.

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

About Us

"It's about Microsoft Excel"