gibbo1715
09-01-2005, 07:42 AM
If i have a row in a spreadsheet that is formatted hh:mm, how do i get my list box to display it in the same format?
something similar to below i guessing although the below doesnt work for me
For i = 3 To LastRow
If Cells(i, "G").value = "y" Then
oLB.AddItem Cells(i, "A")
oLB.List(oLB.ListCount - 1, 1) = Cells(i, "B")
oLB.List(oLB.ListCount - 1, 2) = Cells(i, "C")
oLB.List(oLB.ListCount - 1, 3) = Cells(i, "D")
oLB.List(oLB.ListCount - 1, Format(4, "hh:mm")) = Cells(i, "E")
oLB.List(oLB.ListCount - 1, 5) = Cells(i, "F")
oLB.List(oLB.ListCount - 1, 6) = i
End If
something similar to below i guessing although the below doesnt work for me
For i = 3 To LastRow
If Cells(i, "G").value = "y" Then
oLB.AddItem Cells(i, "A")
oLB.List(oLB.ListCount - 1, 1) = Cells(i, "B")
oLB.List(oLB.ListCount - 1, 2) = Cells(i, "C")
oLB.List(oLB.ListCount - 1, 3) = Cells(i, "D")
oLB.List(oLB.ListCount - 1, Format(4, "hh:mm")) = Cells(i, "E")
oLB.List(oLB.ListCount - 1, 5) = Cells(i, "F")
oLB.List(oLB.ListCount - 1, 6) = i
End If