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

D

Drom

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!!
 
N

Norman Jones

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

Leith Ross

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top