LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically connecting to a remote database Tony Excel Discussion (Misc queries) 0 April 14th 08 05:35 PM
Connecting to SQL from Excel Keith La Force Excel Programming 4 March 2nd 05 09:27 PM
Connecting to External Database Geert Excel Programming 1 January 10th 05 04:46 PM
Connecting to excel datasheets using C# Narwe Excel Programming 1 November 22nd 04 02:01 PM
Excel Connecting to SQL Server Database - Need your Help Rajesh G Excel Programming 2 February 27th 04 08:01 PM


All times are GMT +1. The time now is 09:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"