Solved

What is CLNG in VB?

Posted on 1997-07-24
1
1,492 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses
Course of the Month5 days, 23 hours left to enroll

626 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