I am trying to format the second column of my listbox with currency format ("$#,##0.00"), but running into some trouble. Any help with be greatly appreciated!
Here is some test Data:
Dim ws1 As Worksheet
Set ws1 = ThisWorkbook.Sheets("PivotTable")
Dim rng1 As Range
Dim LR1 As Long
LR1 = Range("A" & Rows.Count).End(xlUp).Row
Set rng1 = ws1.Range("A1:A" & LR1).SpecialCells(xlCellTypeVisible)
With Me.ListBox1
.ColumnCount = 2
.ColumnWidths = "120,100"
For Each Cell In rng1
.AddItem Format(Cell.Value, "$#,##0.00")
.List(.ListCount - 1, 1) = Cell.Offset(0, 1).Value
.List(.ListCount - 1, 2) = Cell.Offset(0, 2).Value 'Format this column
Next Cell
End With
This is the result I am getting now: