Unanswered: Can't find object or library - I'm stumped!!
I took over a co-workers Access 2002 application. It was currently working at one site and needed to be put on another. (Sounded simple). I sent it to the new user to setup and when they tried to run it got:
Compile Error: Can't find object or library
The mdb was created in Access 2002 SP 2, the user has the same.
When I stepped through the code I found it was erroring on a TRIM:
Function GetFileName() As String
Dim gfni As adh_accOfficeGetFileNameInfo
.hwndOwner = Application.hWndAccessApp
.strDlgTitle = "Import Wal-Mart Routes Raw Data"
.strOpenTitle = "Select"
.strFile = ""
.strInitialDir = Application.CurrentProject.Path
.strFilter = "XLS (*.xls)"
.lngFilterIndex = 2
.lngView = adhcGfniViewList
.lngFlags = adhcGfniNoChangeDir Or adhcGfniAllowMultiSelect Or adhcGfniInitializeView
If adhOfficeGetFileName(gfni, True) = adhcAccErrSuccess Then
GetFileName = Trim(gfni.strFile)
At first I thought it was a common dialog issue, but then noticed it was using an API call to msaccess.exe to create the dialog box. I checked all the references and made sure msaccess.exe was where it was supposed to be. I even tried to reinstall MDAC 2.8 (advice from a coworker).
I'm at a loss right now. The only thing I can think is that maybe MS Office wasn't installed properly on the user's computer?