traveller4
Programmer
I have populated a list box that has two columns.
I want to display both columns in a message box but all that comes up is the first column
Here is my load code
Dim intrCount As Long
Dim i As Long
Dim arFill()
Sheets("CaseSetup").Select
Range("A2").Activate
Set dbRange = ActiveCell.CurrentRegion
intrCount = dbRange.Rows.Count
ReDim arFill(1 To intrCount, 1 To 2)
For i = 1 To intrCount
arFill(i, 1) = Sheets("CaseSetup").Cells(i, 2)
Next i
For i = 1 To intrCount
arFill(i, 2) = Sheets("CaseSetup").Cells(i, 1)
Next i
ListBox1.ColumnCount = 2
ListBox1.List = arFill
When the user make the selection and then goes to save to the spreadsheet I want to display a message box.
The best I seem to be able to do is get the 1st column to display in the message box.
Dim Msg As String
Msg = ""
Msg = lstSetCase.Value
MsgBox ("You have selected: " & Msg)
Is there a way to extract the first and the second column
so I can put them in a message box
--thanks in advance
I want to display both columns in a message box but all that comes up is the first column
Here is my load code
Dim intrCount As Long
Dim i As Long
Dim arFill()
Sheets("CaseSetup").Select
Range("A2").Activate
Set dbRange = ActiveCell.CurrentRegion
intrCount = dbRange.Rows.Count
ReDim arFill(1 To intrCount, 1 To 2)
For i = 1 To intrCount
arFill(i, 1) = Sheets("CaseSetup").Cells(i, 2)
Next i
For i = 1 To intrCount
arFill(i, 2) = Sheets("CaseSetup").Cells(i, 1)
Next i
ListBox1.ColumnCount = 2
ListBox1.List = arFill
When the user make the selection and then goes to save to the spreadsheet I want to display a message box.
The best I seem to be able to do is get the 1st column to display in the message box.
Dim Msg As String
Msg = ""
Msg = lstSetCase.Value
MsgBox ("You have selected: " & Msg)
Is there a way to extract the first and the second column
so I can put them in a message box
--thanks in advance