CSng function example
This example uses the CSng function to convert an integer value to a single value.
Private? Sub? Command 1_Click()
Dim? MyInteger? As? integer
Dim? My single? As? single
MyInteger? =? 7534
My single? =? CSng (my integer)
Debugging. Print? My singleness
Debugging. Print? LenB(MyInteger)
Debugging. Print? Rambo (My Single)
End? The output of the child debugger. Print LenB(MyInteger) is 2, which is the number of bytes of integer data type.
Debugging output. Print LenB(MySingle) is 4, which is the number of bytes of a single data type.