ramu
ramu

Reputation: 1029

Disable scientific notation in vb6

How to disable scientific notation in vb6.

Ex:if i assign a variable like this

a=170000000113123123

It changes to

a = 1.70000000113123E+17

After pressing enter.How can we avoid this?

Upvotes: 0

Views: 1290

Answers (2)

ramu
ramu

Reputation: 1029

I tried with variant type as below.

dim a as variant

a=cdec("170000000113123123").

Debug.print a 'displays 170000000113123123

Am i doing the right thing?

Upvotes: 1

Deanna
Deanna

Reputation: 24283

VB6 does not support literal values of that precision/size.

From the data type summary a single is limited to ~8 significant figures while doubles are limited to ~15 significant figures.

You will need to find a large number library to work with numbers that large.

Upvotes: 0

Related Questions