Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > CLng FunctionThis standard VB function converts an expression to the data type long by rounding. SyntaxReturnsThe value of expression as a number of type long. UsageAfter rounding, the resulting number must be within the range of -2,147,483,648 to 2,147,483,647, or an error occurs. Strings that cannot be converted to a long result in a Type Mismatch error. Variants containing null result in an Illegal Use of Null error. ExampleThis example divides the US national debt by the number of people in the country to find the amount of money each person would have to pay to wipe it out. This figure is converted to a long integer and formatted as currency. Sub Button_Click See AlsoCCur Function |
Siebel VB Language Reference |