Return to VBA Code Examples

VBA CLngLng Function

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on July 19, 2021

CLngLng Description

Returns the expression converted to a longlong (64 bit platform) data type. Valid on 64-bit platforms only.

CLngLng Syntax

In the VBA Editor, you can type¬† “CLngLng(” to see the syntax for the CLngLng Function:

The CLngLng function contains an argument:

Expression: Any string or numeric expression.

Examples of Excel VBA CLngLng Function

Sub CLngLng_Example()
    Dim lngVal As LongLong
    lngVal = CLngLng("-92233720368.54775808")
    MsgBox lngVal
End Sub

Running the above VBA code, it will display a message box as following.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as

Learn More!

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples