LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Access automation from Excel

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
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
Automation to Excel from Access Bob Barnes Excel Discussion (Misc queries) 1 February 11th 08 05:18 AM
Running Access-to-Excel Automation.... Bob Barnes Excel Discussion (Misc queries) 2 June 16th 06 08:57 PM
automation from access into excel SAm Excel Discussion (Misc queries) 7 January 27th 06 02:49 AM
Automation from .pdb to excel and then to access Kenny chan Excel Programming 1 December 13th 03 01:28 AM
Automation Excel & Access GarethG Excel Programming 6 October 3rd 03 09:14 AM


All times are GMT +1. The time now is 11:46 PM.

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

About Us

"It's about Microsoft Excel"