Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello! I'm trying to connect to an Access database using Late Binding but my
little simple code will not open the database. I appreciate your help!!! Sub Test() Dim strConnection As String strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=M:\database.mdb;" Dim cn As Object Set cn = CreateObject("ADODB.Connection") cn.Open strConnection ' Find out if the attempt to connect worked. If cn.State = adStateOpen Then MsgBox "You are connected!" Else MsgBox "Sorry. You are not connected." End If ' cn.Close End Sub -- Dr. M |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Late binding to Excel from Access causing Object error | Excel Discussion (Misc queries) | |||
Late Binding access reference in Excel Module | Excel Programming | |||
Late Binding Excel in Access | Excel Programming | |||
Late Binding examples of binding excel application | Excel Programming | |||
late binding in excel | Excel Programming |