Sub GetData2()
Dim oCon As ADODB.Connection
Dim oRec As ADODB.Recordset
Dim sConnString As String
Dim oCommand As ADODB.Command
Set oCon = New ADODB.Connection
With oCon
.Provider = 'Microsoft.Jet.OLEDB.4.0;'
.ConnectionTimeout = 30
.CursorLocation = adUseClient
.Open 'Data Source=C:\\monchemin\\mabase.mdb'
End With
Set oCommand = New ADODB.Command
With oCommand
.ActiveConnection = oCon
.CommandType = adCmdStoredProc
'Nom de la requête stockée dans Access
.CommandText = 'Data_Roul'
End With
Set oRec = oCommand.Execute
Feuil11.Cells(1, 1).CopyFromRecordset oRec
oRec.Close
oCon.Close
End Sub