Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ..ListIndex That is what i needed. Thanks a ton ironhydroxide "Dave Peterson" wrote: This worked ok for me: Option Explicit Private Sub CommandButton1_Click() With Me.ListBox1 If .ListIndex < 0 Then Exit Sub 'nothing selected End If MsgBox .List(.ListIndex, 0) & vbLf & .List(.ListIndex, 1) End With End Sub Private Sub UserForm_Initialize() With Me.ListBox1 .ColumnCount = 2 .ColumnWidths = "33;33" .List = Worksheets("sheet1").Range("A1:B5").Value End With End Sub ironhydroxide wrote: I have a 2Column Listbox. I do not know how to get both columns to variables, i have tried multiple ways and can seem to only get the first column (which the User has Highlighted) into a variable. How do i get both values (either in Lines down, or in a string format) into either two variables or an array. Thanks Ironhydroxide -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Listbox Selection Displays the Column. | Excel Worksheet Functions | |||
Listbox Selection Displays the Column. | Excel Worksheet Functions | |||
Listbox Selection Displays the Column. | Excel Worksheet Functions | |||
Listbox Selection Displays the Column. | Excel Worksheet Functions | |||
displaying selection data from a listbox | Excel Programming |