arrange listbox (w/ checkboxes) on a userform into TWO COLUMNS when the source for the listbox is one column table...(?)

kbishop94

Active Member
Joined
Dec 5, 2016
Messages
458
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Here is what have now:
Capture63.JPG

and here is how I would like the listbox to be shown
Capture66.JPG
(i cheated when I made this image... its actually two separate listboxes made to look like its all one )

I googled the heck out of this trying to find something that would work, but the closest thing I could find was some windows code (not excel VBA)
this looks close to what I need but I would like to limit it to two columns.
Capture68.JPG

My code right now for when the userform is initialized:
VBA Code:
Private Sub UserForm_Initialize()
'****
    Me.StartUpPosition = 0
    Me.Top = Application.Top + 200
    Me.Left = Application.Left + 550
'****
Dim ws As Worksheet
Set ws = Worksheets("LookupLists")
'****
Dim xCus As Range
'****
lstCustomer.List = Sheet5.ListObjects("Table13").DataBodyRange.Value2
lstCustomer.ColumnCount = 2
'****
End Sub
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Have you considered using a ListView control?

listview.png


Note, however, it's only available on the Windows version of Excel, and is not compatible with the 64-bit version.
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,031
Members
449,092
Latest member
ikke

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
Back
Top