Align and widths code at same time

jdcar

Board Regular
Joined
Apr 27, 2012
Messages
163
Hi
I already questioned this forum for several aligns in a column of Listbox, and it was gratifying to me, but to complete my curiosity and for the possibility to know more, i would like to also match the column widths, will that be possible?
I've used the code below separately and it works.
= Different Widths =>Change the Column Widths of a Multi-Column List Box from (microsoft.com)
= Different Align =>Align Columns Differently in VBA UserForm ListBox, from (Wellsr.com)
But, how to use the methods below at the same time, that is, to discipline the size of each column in a listbox as well as the alignment of each column.
Thank you very much for the help you can give.
Greetings
Jdcar
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

ISY

Active Member
Joined
Nov 16, 2009
Messages
269
Hi

You can modify the code
It becomes difficult to manage maintenance
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
23,970
I don't see any code in the OP.
AFAIK, you cannot change multi-column listbox columns so that one is aligned left and another aligned right.
To make the column widths of two listboxes match
VBA Code:
ListBox2.ColumnWidths = ListBox1.ColumnWidths
 

jdcar

Board Regular
Joined
Apr 27, 2012
Messages
163
Hi
It is very annoying because it is not possible to apply align and width to multi columns at the same time, however I thank you for your availability in the feed-back. thank you
Greetings
 

Watch MrExcel Video

Forum statistics

Threads
1,127,683
Messages
5,626,275
Members
416,170
Latest member
Urraco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top