View Single Post
 
Old 03-14-2015, 07:07 PM
Dick_in_Dallas Dick_in_Dallas is offline Windows 7 32bit Office 2007
Novice
 
Join Date: Nov 2014
Location: Richardson, TX
Posts: 3
Dick_in_Dallas is on a distinguished road
Default Run-time error in VB.NET program that worked under Office XP but quit when upgraded to Office 2007

I have a VB.NET program (prjPathfinder.NET) that uses MS Access. It worked fine with MS Office XP. Because of security concerns attributed to MS Office XP, it was upgraded to MS Office 2007. prjPathfinder.NET immediately encountered a build error, (Type Excel.Global is not defined), which was subsequently RESOLVED by an automated software update from Microsoft. The build error was masking a run-time error, (The type initializer for 'prjPathfinder.UpgradeSupport' threw an exception). The UpgradeSupport module in prjPathfinder.NET is automatically generated by Visual Basic and is only four lines long. The exception that was thrown is unspecified and is preventing the MS Access database from being opened. The entire UpgradeSupport module is as follows:

Module UpgradeSupport
Friend DAODBEngine_definst As New DAO.DBEngine
Friend ExcelGlobal_definst As New Microsoft.Office.Interop.Excel.Global
End Module

...As near as I can determine, the statement where the run-time error is occurring is:

PacDb = DAODBEngine_definst.OpenDatabase(DB_Path)

...where PacDb is the database name. How do I get the program to specify the details of the exception that is being thrown? How do I fix this error? (The Access database opens normally from the shortcut on the desktop.)
Reply With Quote