Generally, it's a bad idea to use Variants when the same data can be captured by one of the other data types. The more frequently you use them, the slower in general your program will be.

In this case, two alternatives are Single and Double.

Dim x as Single
Dim y as Double <-- Recommended

You should almost always use the Double type for decimal numbers. It has both a larger range and higher precision. Since disk storage is generally cheap and RAM rather plentiful, there are really no advantages to using Single. (Of course, if you're dealing with some high volume application with specific conditions... maybe; but most everyday users will never encounter such a situation.)


Scott