我正在用一系列数字填充列表框(仅在过滤器后可见的数字)。我需要将该列的格式设置为货币(“ $#,## 0.00)。
任何帮助都是伟大的!
我相信我已经尝试了所有方法,但正在寻找任何可能的建议。
Dim rngSize As Range
Set rngSize = ws1.Range("O12:O" & LR1).SpecialCells(xlCellTypeVisible)
With frmReportEnd.lbSize
For Each Cell In rngSize
.ColumnCount = 1
.ColumnWidths = "100"
.AddItem Cell.Value
.List(.ListCount - 1, 1) = Format(rngSize)
Next Cell
End With
答案 0 :(得分:0)
Dim rngSize As Range
Set rngSize = ws1.Range("O12:O" & LR1).SpecialCells(xlCellTypeVisible)
With frmReportEnd.lbSize
.ColumnCount = 1
.ColumnWidths = "100"
For Each Cell In rngSize
.AddItem Format(Cell.Value, "$#,##0.00")
.List(.ListCount - 1, 1) = Format(rngSize)
Next Cell
End With