CByte Function

Converts a string or a numeric expression to the Byte type.

Syntax:


Cbyte( expression As Variant) As Byte

Return value:

Byte

Parameters:

Expression: Any string or a numeric expression that can be evaluated to a number. Decimal values are rounded to the nearest tenth. Valid values range from 0 to 256.

Error codes:

5 ์ž˜๋ชป๋œ ํ”„๋กœ์‹œ์ € ํ˜ธ์ถœ์ž…๋‹ˆ๋‹ค.

6 ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

Example:


  Sub CByte_example
      Print CByte( expression := "17"/2 + 7.44), CByte(EMPTY), CByte(PI)
      ' Above expressions are computed as 16, 0 and 3
  End Sub

Please support us!