abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,494
- Office Version
- 2019
- 2010
- Platform
- Windows
Hello
I have this part of my project
I try showing format date in first column in listbox like this 2023/08/06
and formatnumber in column 3,4,5 like this 200,220.00
but doesn't work for me as in code above and bold lines
any help to fix it ,please ?
I have this part of my project
Rich (BB code):
Private Sub LBoxPop()
Data = ws.Cells(1).CurrentRegion.Value: x = 0
ReDim Temp(1 To UBound(Data, 1), 1 To 5)
For i = 1 To UBound(Data)
x = x + 1
Temp(x, 1) = Format(Data(x, 1), "yyyy/mm/dd")
Temp(x, 3) = Format(Data(x, 3), "#,##0.00")
Temp(x, 4) = Format(Data(x, 4), "#,##0.00")
Temp(x, 5) = Format(Data(x, 5), "#,##0.00")
For ii = 1 To 5
Temp(x, ii) = Data(i, ii)
Next ii
'End If
Next i
With UserForm1.ListBox1
.ColumnCount = 5
.columnWidths = "80;240;120;120;120"
.List = Temp
End With
End Sub
and formatnumber in column 3,4,5 like this 200,220.00
but doesn't work for me as in code above and bold lines
any help to fix it ,please ?