Hi,
Until I upgraded my laptop I was running Windows XP Service Pack 3 and Office (Access) 2003. I wrote a database for work on my old system that contains a lot of VBA code. I provided the database to a coworker who is running Windows 7 and Office 2010. The program worked perfectly for him out of the gate. I have just received a new laptop with Windows 7 and Office 2010. When I tried running my databases (I have several) many have errors which I assume are all related so I will focus on the one mentioned above.
When I open the database and then click on a control that is supposed to open an Excel spreadsheet and manipulate the spreadsheet data, the spreadsheet opens but no data is updated. When I close the spreadsheet there is an open Access dialog box that states: Run time error '48': Error in loading DLL. I gave an EXACT copy of this database immediately after it failed on my machine and had my coworker try it on his machine. As expected, it worked perfectly. The spreadsheet is embedded in an OLE, therefore, the coworker and I are actually manipulating the exact same spreadsheet when we were both working on the same copy of the database.
If I click on debug in the dialog box it takes me to the following line in my DBA code: Set objXL = GetObject(, "Excel.Application")
I don't want to start changing anything in my code without understanding what is going on since this same database runs perfectly on a machine that is configured with Windows 7 and Access 2010.
I checked the selected references on each machine and they are identical:
* Visual Basic for Applications
* Microsoft Access 14.0 Object Library
* OLE Automation
* Microsoft DAO 3.6 Object Library
* Microsoft AxtiveX Data Objects 2.1 Library
* Microsoft Excel 14.0 Object Library
* Microsoft Office 14.0 Object Library
* Microsoft Visual Basic for Applications Extensibility 5.3
I know that there is something called "late binding" that I believe assists with compatibility issues, however, I'm not versed in this technique and hate to do anything drastic when this database works on a similar environment. Any direction would be greatly appreciated as I'm now paralyzed with so many of my databases acting up.
Thanks,
Pat