Unanswered: Automation error message when trying to connect to AS400 from excel vba
Hi I have the following code in vba excel to connect to as400 server.
However it gives...
Dim varState As String
Set CS = CreateObject("ADODB.Connection")
Set RS = CreateObject("ADODB.Recordset")
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
'Retrieve values from Cells on the sheet to use as selections in the query below
varState = ActiveSheet.Range("C2").Value
varFrom_Date = ActiveSheet.Range("B3").Value
varTo_Date = ActiveSheet.Range("B4").Value