Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Connecting To a Excel Database
Hi All, Im pretty new to vba programming Ive developed simple vb apps i the past but never needed to connect to a database. What do I need to do setup the connection, Ive currently got this in m code and throws up an error message: Dim cn as ADODB.Connection Set cn = New ADODB.Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "Data Source=C:\MyFolder\MyWorkbook.xls;" & _ "Extended Properties=Excel 8.0;" .Open End With When I try to run it I get the error: User defined type not define for the ADODB.Connection so I havnt set this up correctly I have MDA 2.5 already installed so what else do I need to setup. Thanks in Advance -- NOODLES10148 ----------------------------------------------------------------------- NOODLES101487's Profile: http://www.hightechtalks.com/m8 View this thread: http://www.hightechtalks.com/t226110 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamically connecting to a remote database | Excel Discussion (Misc queries) | |||
Connecting to SQL from Excel | Excel Programming | |||
Connecting to External Database | Excel Programming | |||
Connecting to excel datasheets using C# | Excel Programming | |||
Excel Connecting to SQL Server Database - Need your Help | Excel Programming |