+ Reply to Thread
Results 1 to 4 of 4

Listbox Alignment Help

  1. #1
    Registered User
    Join Date
    04-29-2004
    Posts
    92

    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....

    Please Login or Register  to view this content.

    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

  2. #2
    Mangesh Yadav
    Guest

    Re: 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" <[email protected]> wrote
    in message news:[email protected]...
    >
    > 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. #3
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote
    in message news:[email protected]...
    >
    > 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. #4
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote
    in message news:[email protected]...
    >
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1