dhartford
08-17-2008, 09:32 PM
Help is needed. Thanks in advance.
I have the following code to transfer data from Access to Excel. I received error msg: "Data source name not found and no default driver specified". Data source name is correct with correct path:
Private Sub cmdSubmit_Click()
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
Dim strConn As String
strConn = "Microsoft.Jet.OLEDB.4.0" & _
"Data source = F:\View\Viewer_fname.xlsx;" & _
"Extended Properties=Excel 12.0 Xml;HDR=YES"
cnn.Open strConn
Debug.Print strConn
End Sub
I have the following code to transfer data from Access to Excel. I received error msg: "Data source name not found and no default driver specified". Data source name is correct with correct path:
Private Sub cmdSubmit_Click()
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
Dim strConn As String
strConn = "Microsoft.Jet.OLEDB.4.0" & _
"Data source = F:\View\Viewer_fname.xlsx;" & _
"Extended Properties=Excel 12.0 Xml;HDR=YES"
cnn.Open strConn
Debug.Print strConn
End Sub