VBA Code to add "Microsoft Excel 12.0 Object Library" to Access .mdb VBA module

E

EagleOne

What is the VBA Code to add "Microsoft Excel 12.0 Object Library" to an Access .mdb VBA module?

TIA EagleOne
 
B

Beetle

Open a code window, go to Tools/References. Scroll own the list
(it's alphabetical) until you find the "Microsoft Excel 12.0 Object Library"
reference, check it , then click OK.
 
R

Roger Carlson

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "SetReferenceToDAO.mdb" which programmatically sets a
reference to DAO (Microsoft DAO 3.6 Object Library) if it does not exist.
Setting a reference to Excel would be similar and you should be able to
generalize from it.

You can find the sample here:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=270

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
T

Tony Toews [MVP]

What is the VBA Code to add "Microsoft Excel 12.0 Object Library" to an Access .mdb VBA module?

Now why do you want to add a reference on the fly? Or will late
binding take care of the issues?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top