Auto number formatting
I did correct your code.
Delete the code you currently have and paste this code into you sheet module.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("H14")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
Me.Range("F20:G38, G39:G40").NumberFormat = "[$" & Target.Value & "] #,##0" & _
IIf(Target.Value = "Indonesian Rupiah", "", ".00")
Select Case Target.Value
Case "U.S. Dollar", "Australian Dollar", "Canadian Dollar"
Me.Range("G41").NumberFormat = "$#,##0.00"
Case "Indonesian Rupiah"
Me.Range("G41").NumberFormat = "#,##0 Rp"
Case "British Pound"
Me.Range("G41").NumberFormat = "£#,##0.00"
Case "European Euro"
Me.Range("G41").NumberFormat = "€#,##0.00"
End Select
endit:
Application.EnableEvents = True
End Sub
Or send me your workbook by email and I'll see what I can do.
Change the AT and DOT to get my address.
Gord
On Tue, 18 Sep 2007 01:34:18 -0000, Randy wrote:
The reason I posted a question to this group was to get some
assistance in solving a problem. If I was able to write the code
myself, I would have done so. I posted the code in the last message so
that someone could see what I have for code and perhaps correct it for
me. If you are unable to assist, can you please direct me to another
group site............. perhaps I'm dealing with a group that is only
for professionals???????? Thanks for helping me get within grasp of
the final solution.
|