Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleConvert text into the Currency data type (or other types)
KeywordsCCur, convert, currency
CategoriesSoftware 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
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated