I just changed to windows 7 and excel 2010. Now my excel macro code errors out saying provider not found, may not be properly installed. This is the function where the error occurs, do anyone know how to update the code to work with my new version of windows and excel.
Code:
Private Function GetCNN(ByVal csvPath As String) As ADODB.Connection
Set GetCNN = New ADODB.Connection
With GetCNN
.CommandTimeout = 0
.ConnectionTimeout = 0
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source = " & csvPath & ";" & _
"Extended Properties = ""text;HDR=Yes;FMT=Delimited(,)"""
.Open
End With
End Function