Hi Bernard,
I also tried to solve this problem, and for euro my Excel recorded
numberformat "[$ぎ-2]# ##0,00"
Note the ぎ sign!
In VBA
ActiveCell.NumberFormat = "["[$ぎ-2]# ##0.00"
worked perfectly.
In your example ぎ sign is replaced by ? (question mark). Did it produce ぎ
sign on the worksheet?
I also recorded cell formatting to ツ」, and it resulted in a nice ツ」 9999.99
format in the cell but it was recorded in the macro as "[$L-809]#,##0.00"
format code.
In VBA
ActiveCell.NumberFormat = "[$L-809]#,##0.00"
gave an ugly L 9999.99 format.
In no way I could produce ツ」 9999.99 format in the cell through VBA.
Do you know why? And how to overcome it?
Regards,
Stefi
曖ernard Liengme ezt テ*rta:
Begin by recording three macros: one for each currency. Here is mine for the
Euro
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 03/03/2009 by Bernard V Liengme
'
'
Range("A2").Select
Selection.NumberFormat = "[$?-2] #,##0.00"
End Sub
I edited this to become
Sub Euro()
ActiveCell.NumberFormat = "[$?-2] #,##0.00"
End Sub
Next use View | Toolbars | Forma to add three buttons to your worksheet
Assign one of your macros to each button as you make them
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
"kafukalatrava" wrote in message
...
Hi all,
I'm working in a spreadsheet with different currencies.
Is there a way to create buttons to change the format of a cell to a
different currency? I'd need 3 of them (for ?, $ and ツ」 )
thx