+ Reply to Thread
Results 1 to 3 of 3

Set the text align property of each individual column on UserForm1.ListBox1.ColumnCount = 5

  1. #1
    Drom
    Guest

    Set the text align property of each individual column on UserForm1.ListBox1.ColumnCount = 5




    Hi!

    I have a UserForm "UserForm1"
    This Userform has a ListBox "UserForm1.ListBox1"
    This ListBox's, ClumnCount = 5, "UserForm1.ListBox1.ColumnCount = 5"

    Now is it possible:
    To set the text align property of each individual column ??

    Kind of:
    UserForm1.ListBox1.TextAlign = fmTextAlignRight
    UserForm1.ListBox1.Column(3).TextAlign = fmTextAlignLeft
    UserForm1.ListBox1.Column(5).TextAlign = fmTextAlignCenter

    THANKS!!




  2. #2
    Norman Jones
    Guest

    Re: Set the text align property of each individual column on UserForm1.ListBox1.ColumnCount = 5

    Hi Drom,

    > Now is it possible:
    > To set the text align property of each individual column ??


    The individual columns do not have an alignment property. The ListBox's
    AlignText property sets the alignment for all columns.


    ---
    Regards,
    Norman

    "Drom" <NoSpam@hotmail.com> wrote in message
    news:ek43Wce1FHA.2964@TK2MSFTNGP09.phx.gbl...
    >
    >
    >
    > Hi!
    >
    > I have a UserForm "UserForm1"
    > This Userform has a ListBox "UserForm1.ListBox1"
    > This ListBox's, ClumnCount = 5, "UserForm1.ListBox1.ColumnCount = 5"
    >
    > Now is it possible:
    > To set the text align property of each individual column ??
    >
    > Kind of:
    > UserForm1.ListBox1.TextAlign = fmTextAlignRight
    > UserForm1.ListBox1.Column(3).TextAlign = fmTextAlignLeft
    > UserForm1.ListBox1.Column(5).TextAlign = fmTextAlignCenter
    >
    > THANKS!!
    >
    >




  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Drom & Norman,

    Just a side note. In Visual Basic 6.0 it would be possible because the control has a window handle property (hWnd). Using the Applications Programming Interface (API) you can control the individual alignments. Unfortunately, this isn't the case in VBA.

    Sincerely,
    Leith Ross

+ 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