PDA

View Full Version : Solved: Accounting format



lifeson
07-03-2008, 01:17 AM
How do I format a column in a list view to display the value in accounting format

I used the macro recorder and got this:

Selection.NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)"
But when I transfer that to my code:

.ListItems(i).ListSubItems.add , , Format(total, "? #,##00.00")

to
.ListItems(i).ListSubItems.add , , Format(total, "_(?* #,##0.00_);_(?* (#,##0.00);_(?* ""-""??_);_(@_)")


It doesn't give the desired result :think:

Bob Phillips
07-03-2008, 01:22 AM
Some formats are not supported by VBAs Format method. Try Application.Text as an alternative.

lifeson
07-03-2008, 06:57 AM
Thanks XLD
Took the simpler approach and added a column that just hold the ? sign