![]() |
#5
|
|||
|
|||
![]()
Thanks, I found that:
To populate a two column listbox: With UserForm.LB1 .ColumnCount = 2 .ColumnWidths = "6;6" .AddItem "1" .List(0, 0) = "Name1" .List(0, 1) = "E-mail1" .AddItem "2" .List(1, 0) = "Name2" .List(1, 1) = "E-mail2" .ListIndex = 1 ' Sets the default value End With To retrieve: First Column: UserForm.LB1.Column(0, .LB1.ListIndex) Second column: UserForm.LB1.Column(1, .LB1.ListIndex) To populate a single column listbox: With UserForm.LB1 .AddItem "Name1" .AddItem "Name2" .ListIndex = 1 End with To retrieve: UserForm.LB1.List(.LB1.ListIndex)
__________________
Backup your original file before doing any modification. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
koreggan | Excel | 1 | 04-23-2016 11:44 PM |
![]() |
Kaatje | Word VBA | 2 | 02-27-2016 09:37 AM |
This is a Userform LIstbox queston: A variable does not set to the value of a listbox | CatMan | Excel Programming | 14 | 08-18-2014 08:14 PM |
![]() |
CatMan | Excel | 1 | 08-08-2014 09:41 AM |
as the return value of another column, using Listbox? | marreco | Excel Programming | 1 | 03-27-2012 12:48 PM |