C Dec function

From StealthBot Wiki
Revision as of 16:18, 25 November 2009 by Ribose (talk | contribs) (C_Dec())
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The C_Dec() Script Support Class function allows you to cast a value to a Visual Basic 6 Decimal variable type.


The C_Dec function was added to StealthBot for version 2.7 by request of [[Imhotep[Nu]]].


'// CDEC
'// Typecasts a VBS variant to the vbDecimal datatype
'//  By request from Imhotep[Nu]
Public Sub C_Dec(ByRef vToCast As Variant)
    vToCast = CDec(vToCast)
End Sub


Casts a value to the VB6 Decimal equivalent.


Dim Value
Value = ... ' assign Value to something
C_Dec Value


  • vToCast is the variable that will be casted. After the function completes, the variable will store the value of the argument as a Visual Basic 6 Decimal type. (VarType() will return 14).


See also