Thread
:
Currency change via vba
View Single Post
#
5
Posted to microsoft.public.excel.programming
Claus Busch
external usenet poster
Posts: 3,872
Currency change via vba
Hi Steve,
Am Sat, 20 Feb 2016 03:07:23 -0800 (PST) schrieb
:
Thanks very much for that, it's plugged straight into my macro and worked a treat.
you are welcome.
You could put the Currency symbols in H6 in a líst of the data
validation.
Then the OP has not to run the macro because it can be fired by
Worksheet_Change.
I also changed the string for $ because I guess it is more reliable in
this way:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) < "H6" Then Exit Sub
Dim Cur_Sym As String, myStr As String
Cur_Sym = Target
myStr = IIf(Cur_Sym = "$", "[$$-en-US]", Cur_Sym)
Range("I25:I42").NumberFormat = myStr & "__#,##0.00;" & myStr &
"__(#,##0.00)"
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
Reply With Quote
Claus Busch
View Public Profile
Find all posts by Claus Busch