DIAdem Help

Method: CByte for VBS

  • Updated2024-09-12
  • 1 minute(s) read

Method: CByte for VBS

Converts an expression into the Variant type with the Byte subtype.

vCByte = Object.CByte(expression)
ObjectVBS
Object with this method. You do not need to specify this object.
expressionVariant
Specifies any expression.
vCByteVariant
Receives the converted value. During conversion the CByte method considers the locale settings of your computer, for example decimal points and thousands separators.

The following example converts a double value into the Byte subtype:

Dim MyDouble
MyDouble = 123.45678          ' Defines a Double
Call MsgBox(CByte(MyDouble))  ' Returns 123

See Also

Objects Overview

Related Topics

Abs | Asc | AscB | AscW | CBool | CByte | CCur | CDate | CDbl | CInt | CLng | CSng | CStr | ChrB | ChrW | Chr | Escape | Fix | Hex | Int | Oct | Sgn | UnEscape