Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run-time error '430' / Class doesn't support Automation
I am trying to import data from one Excel sheet to
another, using ADO, and it doesn't work with Excel 97 as it does with Excel 2000. I am running Excel 97 at work on Win NT 4. Can anyone help me? Here is part of the code: ------------------------- Public Sub LoadList() Dim rsData As ADODB.Recordset Dim szConnect As String Dim szSQL As String 'Create for connection string szConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=D:\Reports\Totals.xls;" & "Extended Properties=Excel 8.0;" 'Query based on a specific range address szSQL = "SELECT * FROM [Summary$a2:b4]" Set rsData = New ADODB.Recordset rsData.Open szSQL, szConnect, adOpenForwardOnly, adLockReadOnly, adCmdText 'Check to make sure data was received If Not rsData.EOF Then Groups.Range("A2:C501").CopyFromRecordset rsData Else MsgBox "No records returned.", vbCritical End If 'Clean up the Recordset object rsData.Close Set rsData = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-time error '1004': AutoFill method of Range class failed | Excel Discussion (Misc queries) | |||
Run-time error '1004': AutoFill method of Range class failed | Excel Discussion (Misc queries) | |||
Run-Time error '1004' : Select method of Range class failed | Excel Discussion (Misc queries) | |||
Class doesn't support Automation... | Excel Programming | |||
HELP!! Excel 2000 Copy of worksheet class failed run time Error 1004 | Excel Programming |