Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would suggest using an ADO recordset with Excel 2000 or
above. Note: You have to make a reference to the "Microsoft ActiveX Data Objects 2.x Library" in the Visual Basic EditorToolsReferences dialog to use this code. Function OpenDataTable() On Error GoTo HandleError Dim rst As ADODB.Recordset Dim cnn As ADODB.Connection Set rst = New ADODB.Recordset Set cnn = New ADODB.Connection cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\AccessDatabaseFile.mdb;" rst.Open "YourTableOrQuery", cnn, adOpenKeyset, adLockOptimistic ......Additional Code....... ExitHe Exit Function HandleError: MsgBox Err.Description Resume ExitHere End Function -----Original Message----- Hello. I need to do some automation of Access from Excel. Can someone please point me to some good MS sites that illustrate how to do it, its object models, etc. For starters, could someone show me a code sample that gets a reference to a table in an Access DB? Thanks in advance for your example code/site refs. . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automation to Excel from Access | Excel Discussion (Misc queries) | |||
Running Access-to-Excel Automation.... | Excel Discussion (Misc queries) | |||
automation from access into excel | Excel Discussion (Misc queries) | |||
Automation from .pdb to excel and then to access | Excel Programming | |||
Automation Excel & Access | Excel Programming |