Dividing numbers using VBA code

A

Access101

The following 3 msgboxes ...

MsgBox 75 / 999
MsgBox 75 / 1000
MsgBox 75 / 1001

Produce the following 3 results ...

7.50750
0.075
7.49250

I would appreciate any help in understanding why all three don't produce
numbers that are < 1
 
L

Lynn Trapp

Actually,
I think if you look at the MsgBox results a little closer you will see that
it actually returns the following result, in the first case

7.50750750750751E-2

Which is the same as 7.5075075075075 * 10^-2

In decimal format it is actually 0.0750750750750751
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top