N
N Selinger
I have some VBA code which accumulates a total of several cells, then puts
that total into a cell formatted as "Accounting" format. Every time this
code runs, it changes the cell formatting to "Currency".
I have tested this with a new, blank workbook and I get the same result.
Try the following:
Sub test()
a = 10
Cells(2, 1) = 0
a = a + Cells(2, 1)
Cells(3, 1).Value = a
End Sub
Why does it change the formatting??? And how do get around this problem?
that total into a cell formatted as "Accounting" format. Every time this
code runs, it changes the cell formatting to "Currency".
I have tested this with a new, blank workbook and I get the same result.
Try the following:
Sub test()
a = 10
Cells(2, 1) = 0
a = a + Cells(2, 1)
Cells(3, 1).Value = a
End Sub
Why does it change the formatting??? And how do get around this problem?