Hello
I am getting values displayed in col 8 as
kindly ignore the zeros in above column at left before the values
Any correct syntax for Format(listBox1.List(iCount, 6), "0.00") so that all the numerical values are displayed right aligned
NimishK
I am getting values displayed in col 8 as
100.00 4500.00 30.00 |
in col 7 of listbox1 How can i displays as 000100.00 004500.00 000030.00 |
kindly ignore the zeros in above column at left before the values
Any correct syntax for Format(listBox1.List(iCount, 6), "0.00") so that all the numerical values are displayed right aligned
VBA Code:
Private Sub cmdBtn_Click()
Dim myItem As Collection, blnSelected As Boolean
Dim i As Long, sItemsCount As Long
blnSelected = False
Set myItem = New Collection
For iCount = 0 To listBox1.ListCount - 1
If listBox1.Selected(iCount) Then
blnSelected = True
myItem.Add Array(listBox1.List(iCount, 0), listBox1.List(iCount, 1), _
listBox1.List(iCount, 2), listBox1.List(iCount, 3), listBox1.List(iCount, 4), _
listBox1.List(iCount, 5), Format(listBox1.List(iCount, 6), "0.00")
sItemsCount = sItemsCount + 1
End If
Next iCount
End Sub
Last edited: