By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,002 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,002 IT Pros & Developers. It's quick & easy.

Compile error: User-defined type not defined.

P: 27
Hi everyone,
I am trying to export a table to an excel file using vba on a form's button click event. I am getting the error:

Compile error: User-defined type not defined.

And it highlights my first line:

Dim appExcel As Excel.Application

Any ideas? I am using Access 2003, but I am using Access 2000 file format. Does this have to with DAO and ADO something-or-others? I'm a beginner with all of this database stuff so please help!
Nov 6 '07 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,364
You need a reference to the Microsoft Excel Object Library.
Nov 6 '07 #2

P: 27
You need a reference to the Microsoft Excel Object Library.
Perfect. Thanks Rabbit.
Nov 7 '07 #3

Rabbit
Expert Mod 10K+
P: 12,364
Not a problem, good luck.
Nov 7 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.