SyntaxDim result As Long = CLng(expression)
DescriptionThe CLng function converts expression to the Long data type; any fractional portion of expression is rounded. Usage at a Glance
ExampleDim targetNumber As Long If IsNumeric(stringNumber) Then targetNumber = CLng(stringNumber) End If Version DifferencesThe CLng function under .NET returns a 64-bit integer; the VB 6 CLng function returned a 32-bit integer. See AlsoCInt Function, CShort Function, CULng Function |