Hi-
Im trying to figure out a code that will list a format("$#,##0.00") in a list box upon activation. This is the code:
Private Sub UserForm_Activate()
Dim Lb1, x As Double
x = 1
With Sheets("balance sheet")
While Lb1 <> Int(Now)
Lb1 = .Range("D1").Offset(x, 0)
x = x + 1
Wend
ListBox1.Clear
ListBox1.AddItem .Range("D1").Offset(x - 1, 1).Value
end with
end sub
If I dont format the listbox1.add item, I get 3.233333. What I want is the listbox1 to read is $3.23 when its activated. Any ideas?
Im trying to figure out a code that will list a format("$#,##0.00") in a list box upon activation. This is the code:
Private Sub UserForm_Activate()
Dim Lb1, x As Double
x = 1
With Sheets("balance sheet")
While Lb1 <> Int(Now)
Lb1 = .Range("D1").Offset(x, 0)
x = x + 1
Wend
ListBox1.Clear
ListBox1.AddItem .Range("D1").Offset(x - 1, 1).Value
end with
end sub
If I dont format the listbox1.add item, I get 3.233333. What I want is the listbox1 to read is $3.23 when its activated. Any ideas?