Forgot to tell you that while in the Access VBA editor, Select Tools ->
References and check the box against Microsoft Excel 10.0 Object library.
(9.0 for 2000, 10.0 for 2002, 11.0 for 2003 and 12.0 for 2007 depending on
which version you are using.) Ensure that you actually check the box. Don't
do what I did the first time and just selected the option and then wondered
why it did not work.