Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto include reference(s) 2

Status
Not open for further replies.

link9

Programmer
Joined
Nov 28, 2000
Messages
3,387
Location
US
hello all --

Quickie for yas --

Is there a way (a line of code) that will automatically include a reference library for a vba application????

Here's the deal -- I have a vba module that has to run on an excel file -- The excel file is derived from an exported .csv and the module is imported to each new file --

I'd like to be able to add a line of code to the top of the module that would automatically reference the ADO library without me having to go to tools-->references and then selecting it from the list --

any input appreciated. :-)
Paul Prewett
 
XL2000: How to Programmatically Create a Reference

You can also alternatively use late-binding, alleviating the need for the reference:

SET oConnection = CreateObject("ADODB.Connection")
SET oRS = CreateObject("ADODB.Recordset") Jon Hawkins
 
excellent --

thank you. :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top