Using CBool function in VB
CBool function is used to convert data into boolean data type. The example below briefly shows how you can apply this CBool function into your programming code.
Dim myData1, myData2 As Integer '--- Variables declaration
Dim Output as Boolean
MyData1 = 3 '--Initialization of data
MyData2 = 5
Output = CBool(MyData1 + MyData2 = 8) 'Check whether MyData1+MyData2 = 8
Msgbox(Output) ' Return output as TRUE
CBool function only returns a value of either TRUE or FALSE. Hence, that shows how CBool functions can be applied in programming
See Also CType Functions
Subscribe to:
Post Comments (Atom)


0 comments
Post a Comment