ciao!
estraggo i dati su un file excel eseguendo due query distinte sul gestionale.
ma ottengo l'errore:
codice:
Errore di run-time '1004';
Errore generale di ODBC.
se vado in debug:
codice:
Set tq = Sheets("ORDINI").QueryTables(1)
tq.Sql = Worksheets("workarea").Range("B27").Value
tq.BackgroundQuery = False
tq.RefreshStyle = xlOverwriteCells ' xlInsertDeleteCells ' xlOverwriteCells
tq.Refresh
Set tq = Sheets("CLIENTI").QueryTables(1)
tq.Sql = Worksheets("workarea").Range("B35").Value
tq.BackgroundQuery = False
tq.RefreshStyle = xlOverwriteCells ' xlInsertDeleteCells ' xlOverwriteCells
tq.Refresh --> RIGA SELEZIONATA DAL DEBUG
solo che:
- sia il foglio ORDINI che CLIENTI esistono
- le query, eseguite nell'SQL Developer, funzionano senza errori
- il foglio CLIENTI, contiene dei dati dai una estrazione precedente (quindi prima funzionava); e anche cancellando tutte le righe ottengo l'errore
non so più che test / debug fare.
qualche idea??