You should strive to use the data type that is most appropriate for each variable. This is a little different from using the "smallest possible" data type. For example, the Boolean data type should consume only 1 bitTrue or False, right? But a Boolean variable is actually the same size as an Integer variable, 2 bytes.
So why carry around extra baggage? Because these days it is better to be safe than small. Even if you might be developing code that will be used on the Internet, where size is an important consideration, it is better to use appropriate data types to make your code safer and more understandable. A Boolean variable will always contain one of two values: True or False. The smallest type, Byte, also always evaluates to True or False. The difference is that a Byte variable can contain any value from 0 to 255, so there's no guarantee that its value represents only True or False. Using a Boolean variable to represent True or False values is a clearer and therefore safer way to program.
Using the most appropriate data type is especially important when you declare object variables. Declaring an object variable as a specific class name rather than using the generic Object data type allows the compiler to optimize the use of that object. (The specifics of this are a little too complicated to discuss here; for more information, see Chapter 24, "ActiveX Objects in Other Applications.")
Always specify data types for each parameter in a procedure. This helps detect the inappropriate use of a procedure. Remember, optional parameters can now have data types other than Variant. This feature was missing in Visual Basic 4, so it's a good idea to go back over procedures you created with that version to see whether you can tighten things up a bit.