Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

long integer in VB6

Status
Not open for further replies.

Eielts

Programmer
Sep 16, 2003
2
NL
Hi all,

How do I declare a "long integer" in VB6.

I want to read the autonumbers in an Access-table.

Greetings, Ger
 
From MSDN: (F1)
==========

Long Data Type

Long (long integer) variables are stored as signed 32-bit (4-byte) numbers ranging in value from -2,147,483,648 to 2,147,483,647. The type-declaration character for Long is the ampersand (&).

[elephant2]

"All I ask is the chance to prove that money can't make me happy." - Spike Milligan
 
Thkx for replying.
The solution is using ths CInt function.

Again thx guys

Ger
 
>The solution is using ths CInt function.

No it's not.

You ask how to declare, not how to convert.

Anyways, the CInt will not convert to a Long integer, but to a "Short" Integer.
There is a difference in the maximum possible number that can be converted (about 32,000).

Check the VB Help as member tb has ´suggested.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top