Got any Excel Questions? Free Excel Help.
The example below shows how CByte can be used in Excel VBA to convert a Byte Data Type. Whole Number from 0 to 255
Sub ConvertToByte() Dim lNum As Double lNum = 169.85 MsgBox CByte(lNum) End Sub
See also:
Convert a String or Number to Boolean |
Free Training Course: Lesson 1 - Excel Fundamentals
See also: Index to Excel VBA Code; Index to Excel Freebies; Lesson 1 - Excel Fundamentals; Index to how to… providing a range of solutions
Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.