Visual Basic 6 Cannot Find DAO350 DLL

1

I have a Visual Basic 6 .project file that is being built with MSBuild. MSBuild is using VB6.exe to do this, and finds the executable fine.

However, the VB6 executable itself cannot find the DAO350.dll file. The dll is located in the usual directory of C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\DAO350.DLL

The dll has been registered successfully with the command regsvr32.exe "C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\DAO350.DLL" In addition, the dll has been unregistered and re-registered successfully to no avail. It has also been replaced by a version of the DAO350 dll that is known to work.

Any help is greatly appreciated.

High1234

Posted 2015-08-14T15:51:37.380

Reputation: 13

Answers

1

way 1:

Add reference DAO 3.6 library to project.

Reference DAO 3.6 library

way 2:

Const TypeLibCLSID = "{00025E01-0000-0000-C000-000000000046}"
References.AddFromGuid TypeLibCLSID, 5, 0

way 3:

strPath = Environ$("CommonProgramFiles(x86)") & "\Microsoft Shared\DAO\DAO350.DLL"

or

strPath = Environ$("CommonProgramFiles") & "\Microsoft Shared\DAO\DAO350.DLL"
References.AddFromFile(strPath)

STTR

Posted 2015-08-14T15:51:37.380

Reputation: 6 180

I do not have access to the project editor to do this. – High1234 – 2015-08-14T16:24:47.163

@High1234 see Update - way 2. – STTR – 2015-08-14T19:13:47.663