Solved

What is CLNG in VB?

Posted on 1997-07-24
1
1,484 Views
Last Modified: 2008-02-26
What is CLng function (VB 5) doing and how can I implement it in VB for DOS (BC.EXE does not know what CLng is)?
0
Comment
Question by:kph1
1 Comment
 
LVL 3

Accepted Solution

by:
ESI earned 50 total points
ID: 1428825
CLng stands for Convet to Long, for example when you want force the representation of an integer (16 bits) to be stored in a Long (32 bits) variable. But most of the time, VB do an implicit convertion when needed.
Ex :
Dim a As Integer, b as Long
Dim v As Variant

a = 3445
b = CLng(a)   '-- Not really needed in VB ! just 4 the example
v = 454546.34 '-- v contains a float
b = CLng(v)   '-- convert it to a long

Hope it helped ! Bye, happy conversion !

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Macro which automatically sends attachment to Outlook 14 69
Add and format columns in vb6 7 56
Help me. 3 54
fso.FolderExists("\\server\HiddenFolder$") 4 65
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question