Excel Code not seeing ODBC driver for Sybase

I am using Win7 and Excel 2010 and the code below error's out.  I have check the ODBC connection and am able to see the ODBC driver with I go to the Data tab in Excel and choose Data Sources from other connections. I have spoke to my tech dept and Sybase and now I am going to see if any Experts have experienced this.  I am running a stored proc from Sybase in Excel VBA

Please see below:

 I am getting this error:  "Microsoft ODBC Driver Manager Data source name not found and no default driver specified on this line
oConnection1.Open m_sConnstr in the code below
Dim oConnection1 As ADODB.Connection
  Dim m_oRecordset1 As ADODB.Recordset

  m_sConnStr = "DSN=" + strODBCName + ";Server=" + strServerName + ";Database=ABC1;UID=ABC1APP;PWD=" + strDBPassWord
  Application.ScreenUpdating = False
  Application.Calculation = xlCalculationManual

' Create and Open the Connection object.
  Set oConnection1 = New ADODB.Connection
  oConnection1.CursorLocation = adUseClient
  oConnection1.Open m_sConnStr
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try this

m_sConnStr = "Provider=Sybase.ASEOLEDBProvider;" & _
           "Srvr=" & strServerName & ";" & _
           "Catalog=ABC1;" & _
           "User Id=ABC1APP;" & _
           "Password=" & strDBPassWord

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.