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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

References

Status
Not open for further replies.

razchip

Technical User
Feb 2, 2001
133
US
Good morning,

I have a database that is used in various departments. When I make a change and have the users copy the program to their pc's, some work, others do not. When they don't work, I have to go to each PC and change the references, the program then works.

Not being a power user, I don't understand why the refereces change when some users copy the file and others don't. Is there a way I can avoid this?

Thanks for any help or suggestions.

Thanks for the help.
Greg
 
It happens when your user has a previous version like ADO 2.1 and you reference ADO 2.6 Happens also with Office. To avoid both you should use the lowest needed for ADO and late binding for Office.

Code:
Dim objWord As Object ' Word.Application
Set objWord = CreateObject("Word.Application")

Dim objExcel As Object 'Excel.Application
Dim objWrkBook As Object 'Excel.Workbook
Dim objWrkSheet As Object 'Excel.Worksheet
Set objExcel = CreateObject("Excel.Application")

....

'When done close them and destroy them
objWord.Quit
Set objWord= Nothing

Set objWrkSheet = Nothing
Set objWrkBook = Nothing
objExcel.Quit
Set objExcel = Nothing
 
I would like to try this, but where do I set ADO in refereces, I don't see that as a selection anywhere, or does this require some code?

Thanks for the help.
Greg
 

You have to open a module. If you haven't written any VBA code yourself, wizzard might have done it for you when making forms. A buttonn for instance. So in a module, menu Tools-->References. There, you have a lot of them to add or play. If it is not ADO then it should be DAO (Access97)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top