abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,494
- Office Version
- 2019
- 2010
- Platform
- Windows
Hello
I want showing number formatting like this #,##0.00 in columns 8,9,10 in list box . I try to add some lines as bold lines, but I failed.
I want showing number formatting like this #,##0.00 in columns 8,9,10 in list box . I try to add some lines as bold lines, but I failed.
Rich (BB code):
Private Sub LBoxPop()
Dim I, myFormat(1) As String
Dim lindex&
Data = ws.Cells(1).CurrentRegion.Value: x = 0
myFormat(0) = ws.Cells(2, 8).NumberFormatLocal
myFormat(1) = ws.Cells(2, 9).NumberFormatLocal
ReDim Temp(1 To UBound(Data, 1), 1 To 10)
For I = 1 To UBound(Data)
If Data(I, 4) Like Crit & "*" Or Data(I, 4) = "C?? C?????" Then
x = x + 1
Temp(x, 2) = Format(Data(x, 2), "DD/MM/YYYY")
For ii = 1 To 10
Temp(x, ii) = Data(I, ii)
Next ii
End If
Next I
With UserForm1.ListBox1
.List(lindex, 7) = Format$(.List(lindex, 7), myFormat(0))
.List(lindex, 8) = Format$(.List(lindex, 8), myFormat(1))
.List(lindex, 9) = Format$(.List(lindex, 9), myFormat(1))
.ColumnCount = 10
.ColumnWidths = "80;80;120;80;60;60;60;60;60;60"
.List = Temp
End With
End Sub