I am having some problem compiling some legacy applications on VB6 since I have a new development machine in Windows 7. (My old one was in Windows XP.)
If I compile the project on my XP machine, everything is fine. If I compile the same project on my Windows 7 machine, it still works fine, but if I try to run it on an XP machine, I got this error.
Error Number: 5
Description: Invalid call or procedure argument
Thanks to my error handler, I know that the line that generates this error is:
Dim objConn As ADODB.Connection
--> Set objConn = New ADODB.Connection
I compared the links on both machines, but they Project - Referencesmatch: (Microsoft ActiveX Data Objects 2.7 Library)
What can cause this error?
source
share