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

Code Access Problem???

Status
Not open for further replies.

marks416

IS-IT--Management
Oct 24, 2007
39
CA
Hi,

I have a VBA question now.

I have did a VBA application and I debuged and compiled in my local computer.It works fine.

After I copy the application to a network server. It works fine when I access it from my computer .but it doesn't work when somebody else access it from his computer.

I do not know why this happen.

It have compile error (DAO errors) when I try to compile it throuht other's computer.But it error free when I accesee and compile it through my computer.

Thanks for help

M




 
Check the references from the machines that are having the errors. You may have to add the dll file to those machines.
 
Do you have if Microsoft have some ADO patches I can download?Thanks

M
 
Go into the visual basic editor and check Tools > references.
If you do this on the machine that is erroring out, you should see that one or more is MISSING. Find out what dll that it is looking for and then add that to those machines. After that, they should work.
 
marks416

You might have referenced ADO 2.8 on your PC while the erroring has ADO 2.6 or DAO 3.6 and DAO 3.51

For othter objects like Word/Excel or whatever if you use late binding you wont have versioning problems
Code:
Dim objWord As Object 'Word.Application
Set objWord = CreateObject("Word.Application")
If you like the intellisence while writting code, reference the library on your PC and
Code:
Dim objWord As Word.Application
Set objWord = CreateObject("Word.Application")
when finished change the Dim

Late binding is slower than early but saves you from that versioning error
 
Hi Jerry,

Do you mean latr binding do not have version problem.right?

code like

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

Do I have to change reference setting for Word.Application?

Thanks for help

M

 

If you do use late binding, remove the reference to that library.
 
Hi Jerry,

Based on my understaning.reference settings is for early binding .and we do not need the reference settings if we use late binding.Is that right?

Application with late binding is slow then application with early binding.

Thanks

M

 
Based on my understaning.reference settings is for early binding .and we do not need the reference settings if we use late binding.Is that right?
That's correct.

Application with late binding is slow then application with early binding.
Yes - but not noticeably so. No one will notice the extra .5 seconds it takes to load.

 
which one is better late binding or early binding?

Thanks

M
 
which one is better late binding or early binding?
When in development: early
For deployment: late

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top