Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO Recordset
Hi folks,
I used the following code to create ado recordset. It works but it aslo opens another excel file. Is it possible to create ado recordset without open a new excel instance? Or can I use currentproject.connection? Thanks in advance. Tim. Sub ConnectToExcelUsingSheetName () Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\fsADOConnectExcel.xls;" & _ "Extended Properties=""Excel 8.0;HDR=Yes"";" rst.Open "SELECT * FROM [Staff List$];", cnn, adOpenStatic, adLockReadOnly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ADO recordset | Excel Programming | |||
Need ADO Recordset Help | Excel Programming | |||
0 with ADODB Recordset | Excel Programming | |||
Type recordset/recordset? | Excel Programming | |||
Recordset | Excel Programming |