Selfassessment exercise

What data type would you assign to a variable that is going to store?

a) The weight of a bunch of carrots in kilograms?

b) The number of people present at a rugby match?

c) The distance between galaxies in miles?

It is good practice to declare all variables before the executable statements in a VBA program begin. By declaring all variable names together at the beginning of a procedure it becomes easier to find a variable name if required. Later in this chapter we will see that it is possible to force the programmer to declare variables.

0 0

Post a comment