a couple of things to try, if VBA (Microsoft Access) suddenly can no longer use a COM library:
1. try removing, then adding the COM reference (Tools | References ...)
2. make sure the reference is to the expected path
3. make sure the referenced DLL is at the path, and that all its dependencies are present.
If the DLL is C++ then use Depends tool.
If the DLL is .NET then use CheckAsm tool.
4. make sure the VBA syntax is correct.
In particular, don't forget the 'set' keyword. Ommitting the 'set' keyword will give a misleading 'null reference' error.
Example:
Dim lrl As LING.reports
lrl = New LING.reports()
should be:
Dim lrl As LING.reports
Set lrl = New LING.reports()
1. try removing, then adding the COM reference (Tools | References ...)
2. make sure the reference is to the expected path
3. make sure the referenced DLL is at the path, and that all its dependencies are present.
If the DLL is C++ then use Depends tool.
If the DLL is .NET then use CheckAsm tool.
4. make sure the VBA syntax is correct.
In particular, don't forget the 'set' keyword. Ommitting the 'set' keyword will give a misleading 'null reference' error.
Example:
Dim lrl As LING.reports
lrl = New LING.reports()
should be:
Dim lrl As LING.reports
Set lrl = New LING.reports()
Comments
Post a Comment