|
|
Title | Convert text into the Currency data type (or other types) |
Keywords | CCur, convert, currency |
Categories | Software Engineering |
|
|
Thanks to Chimeric.
Use an On Error statement to check for invalid values while using CCur
to perform the conversion.
|
|
' Convert any value into currency format. If the
' value does not make sense, return 0.00.
Public Function cvCur(ByVal Value As Variant) As Currency
On Error Resume Next
cvCur = CCur(Value)
If Err.Number <> 0 Then cvCur = 0
End Function
|
|
|
|
|
|