Thanks my friend ....and I am sorry for late in replay ( it's my week end ) .
anyway I couldn't stop my self from laugh ..

I have tested ur Project1.exe file and it work very fine ...and I got the right value .
very good at this point

. I start the VB 6.0 load the source code and run it inside ,and Ooops i got the wrong value again

...what happen here !!!???
is there a good logical reason for that pls
My friend the best command in basic was GoTo ....
I used it in many ways ...I like this command ,it is the best .