Доброе время суток
А обязательно Цитата
сделать через Workbooks.OpenDatabase
?
Я обычно так выгружаю
[vba]Код
Public Sub BookFromQueryToOra()
Const sConn As String = "ODBC;Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ServerNameOrIP)(PORT=1521))(CONNECT_DATA=(SID=ServiceName)));Uid=UserName;Pwd=UserPassword;"
Const sSQL As String = "Select * from SYS.ALL_TAB_COMMENTS Where TABLE_TYPE='TABLE'"
Dim pBook As Workbook, pSheet As Worksheet, pLO As ListObject
Set pBook = Workbooks.Add(xlWBATWorksheet)
Set pSheet = pBook.Worksheets(1)
Set pLO = pSheet.ListObjects.Add(xlSrcExternal, sConn, True, xlYes, pSheet.Range("A1"))
With pLO.QueryTable
.CommandType = xlCmdSql
.CommandText = sSQL
.Refresh False
.Delete
End With
End Sub
[/vba]
Успехов.