Ik probeer externe data vanaf een paradox db met behulp van ODBC in een excel document te laden en deze rechtstreeks in een array te zetten, dus zonder dat de gegevens getoond worden in de sheet.
Weet iemand of dit mogelijk is en zo ja hoe?
Ik laad op dit moment mijn gegevens zo in:
Maar dit geeft een foutmelding. Ik krijg de foutmelding "n:/pcs/tables/horderrg.db is geen geldig pad" Terwijl ik honderd procent zeker weet dat het pad klopt en dat ik ook toegang tot die schijf heb.Code:Sub CreateQT() Dim sConn As String Dim sSql As String Dim oQt As QueryTable Dim testArray As Variant sConn = "ODBC;DSN=test;" sConn = sConn & "DBQ=horderrg.db;" sConn = sConn & "Defaultdir=n:\pcs\tables;" sConn = sConn & "DriverId=538;" sConn = sConn & "FIL=Paradox 5.X;" sSql = "SELECT * FROM HORDERRG ORDER BY HORDERRG.OrderLine" Set oQt = ActiveSheet.QueryTables.Add( _ Connection:=sConn, _ Destination:=Range("o3"), _ Sql:=sSql) oQt.Refresh End Sub
Iemand ideeen?
This post is a duplicate : http://www.excelforum.com/excel-misc...-an-array.html
The English version has been left open as it will attract more viewers.
DominicB
Now available : Ultimate Add-In 2007
Integrates directly into the Office Excel Ribbon
Download Ultimate Add-In v1.52 from www.dom-and-lis.co.uk
90+ Utilities, 200+ Sub utilities last updated 25th April 2008
Free!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks