I have an Excel workbook that contains 3 connections to an Oracle Database. The code I used to open the connection is apparently not compatible with Office 2007. I have spent many hours trying to decipher what it is that I need to do to make this work for both Office 2007 and Office 2003. Can someone please take a look at the code I have included and give me some examples of replacement code.
Dim wrkODBC As Workspace
Dim conORAP039 As Connection
'Run GetVehicleModels_Connection query "VEHICLE_MODEL" on 'Lists' worksheet
Private Sub SetConnectionObject()
' Create ODBCDirect Workspace object and open Connection objects.
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "xxxxxx", "xxxxxx", dbUseODBC)
' Note: The DSNs referenced below must be configured to
' use Microsoft Windows NT Authentication Mode to
' authorize user access to the Microsoft SQL Server.
Set conORAP039 = wrkODBC.OpenConnection("ORAP039", dbDriverNoPrompt, True, _