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

Export to Access - ERROR: User-Defined type not defined

P: n/a
Despite having at least 2 days VBA programming experience, this one has
got me... I'm trying to export multiple tables into one worksheet in
Excel. I've adapted code that I've got from this forum, but I keep
getting the "User-Defined type not defined" error on 'Dim objXL As
Excel.Application'. Again, from my limited time as a veteran copier,
paster and editor, I've had this problem before when using a browse
window - which was fixed by downloading the appropriate reference.

Can anyone tell me if that is the problem, and if so, where would a
fella find such a magical download site to get the required reference?
And of course, if you really wanted to make my day and "lend" me the
magic coding required to export... well, that'd just be dandy....

Cheers

Reg

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

Add a reference to:
Microsoft Excel 10.0 Object Library (or 9.0 depending on your version of
Access).

"Regnab" <p.*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Despite having at least 2 days VBA programming experience, this one has
got me... I'm trying to export multiple tables into one worksheet in
Excel. I've adapted code that I've got from this forum, but I keep
getting the "User-Defined type not defined" error on 'Dim objXL As
Excel.Application'. Again, from my limited time as a veteran copier,
paster and editor, I've had this problem before when using a browse
window - which was fixed by downloading the appropriate reference.

Can anyone tell me if that is the problem, and if so, where would a
fella find such a magical download site to get the required reference?
And of course, if you really wanted to make my day and "lend" me the
magic coding required to export... well, that'd just be dandy....

Cheers

Reg

Nov 13 '05 #2

P: n/a
Regnab wrote:
Despite having at least 2 days VBA programming experience, this one has
got me... I'm trying to export multiple tables into one worksheet in
Excel. I've adapted code that I've got from this forum, but I keep
getting the "User-Defined type not defined" error on 'Dim objXL As
Excel.Application'. Again, from my limited time as a veteran copier,
paster and editor, I've had this problem before when using a browse
window - which was fixed by downloading the appropriate reference.

Can anyone tell me if that is the problem, and if so, where would a
fella find such a magical download site to get the required reference?
And of course, if you really wanted to make my day and "lend" me the
magic coding required to export... well, that'd just be dandy....


Avast ye scurvy scum, hoist the jolly roger :-)

I suspect you already have Excel rather than download it from somewhere
so it should already be in your list of possible references to add.

--
[OO=00=OO]
Nov 13 '05 #3

P: n/a
Arrghhh - you're right. Land ahoy...oh no, hang on a sec... it's a
reef.... haul to the starboard side. This VB business is full of
flamin' wrecks. Thank you both kindly - I've now got my compiler
sailing happily past that part of the problem.... pulling up sharply at
the next line of code ;). But no doub't she'll be a fine export ship
when she's done. Now if only I could get her to stop taking on
water.....

Thanks heaps fellas - much appreciated....

Respect

Mr R

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.