Advertisement
7_2009-2012 String Manipulation #217518

formatcurrency

format a text field into a $ currency field.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Sub validate(textboxname As TextBox)
If KeyAscii > Asc(9) Or KeyAscii < Asc(0) Then
KeyAscii = 0
End If
mypos = InStr(1, textboxname.Text, ".")
If mypos <> 0 Then
textboxname.Text = Format(textboxname.Text, "$###,###,###,###.##")
Else
textboxname.Text = Format(textboxname.Text, "$###,###,###,###")
End If
End Sub
Original Comments (3)
Recovered from Wayback Machine