Hi,
Found this code in the net, what it does reflect the selected item in the msgbox, however this codes takes only the 1st column, how can this code be modified to give the 2nd column and 3rd column data in the msgbox..
Thanks again to all of you for the help..
Found this code in the net, what it does reflect the selected item in the msgbox, however this codes takes only the 1st column, how can this code be modified to give the 2nd column and 3rd column data in the msgbox..
Thanks again to all of you for the help..
Code:
Dim ColCnt As Integer
Dim rng As Range
Dim cw As String
Dim c As Integer
ColCnt = ActiveSheet.UsedRange.Columns.Count
Set rng = ActiveSheet.UsedRange
With ListBox1
.ColumnCount = ColCnt
.RowSource = rng.Address
cw = ""
For c = 1 To .ColumnCount
cw = cw & rng.Columns(c).Width & ";"
Next c
.ColumnWidths = cw
.ListIndex = 0
End With