p9drm1
06-08-2018, 04:23 PM
I'm reading data from an excel spreadsheet in to a multi-column listbox. There are four fields on my excel spreadsheet that contain "True" or "False". When I read them into my listbox using the following code. The List box displays the value of "True" as a 0 and the value of false as a -1. Any ideas how I how I can get the listbox to display the values as True or False instead of a 0 or -1?
Dim sh As Worksheet
Set sh = Worksheets("Events")
With sh
Set Rng = .Range("A1:L" & .Cells(.Rows.Count, 1).End(xlUp).Row)
End With
Me.ListBox1.ColumnCount = 12
Dim myarray As Variant
myarray = Rng.Resize(, Me.ListBox1.ColumnCount).Value
Me.ListBox1.List = myarray
Thanks,
Darryl
Dim sh As Worksheet
Set sh = Worksheets("Events")
With sh
Set Rng = .Range("A1:L" & .Cells(.Rows.Count, 1).End(xlUp).Row)
End With
Me.ListBox1.ColumnCount = 12
Dim myarray As Variant
myarray = Rng.Resize(, Me.ListBox1.ColumnCount).Value
Me.ListBox1.List = myarray
Thanks,
Darryl