AXISHK
asked on
Add column header in Excel list box
Any idea how to add the column header name with Excel VBA ?
Dim strArray(2, 1) As Variant
strArray(0, 0) = "Value 1"
strArray(0, 1) = "Value 2"
strArray(1, 0) = "Value 3"
strArray(1, 1) = "Value 4"
strArray(2, 0) = "Value 5"
strArray(2, 1) = "Value 6"
With ListBox2
.ColumnCount = 2
.List = strArray
.ColumnHeads = True
End With
Thanks
Dim strArray(2, 1) As Variant
strArray(0, 0) = "Value 1"
strArray(0, 1) = "Value 2"
strArray(1, 0) = "Value 3"
strArray(1, 1) = "Value 4"
strArray(2, 0) = "Value 5"
strArray(2, 1) = "Value 6"
With ListBox2
.ColumnCount = 2
.List = strArray
.ColumnHeads = True
End With
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.