LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Need HELP with QueryTable, ADO, EXCEL and EXCEL'S Formulas

Hi Fredrik,

We need to create a QueryTable because there are other formulas that are
referenced to the data in the Query. That is the reason we need to make a
QueryTable instead of copying the values.

We put in a excel formula a user defined function (function 1), this
function calls another one to create a Query Table (function 2). The correct
order is the following:

1st - lista function is called and executed. It calls CreaConsulta funtion.
2nd - CreaConsulta makes a QueryTable, if it is created ok, it returns TRUE
if not it returns FALSE.
3rd - The code returns to the function lista in order to end the rest of
the code that is to return de value returned by CreaConsulta in the value
property of the cell in excel.

For example: You put in A1 the following lista("select * from table1")
lista calls CreaConsulta and creates the QueryTable, if its created A1.value
will be TRUE otherwise will be FALSE. And if the QueryTable has been created,
it will be in B1 cell.

The problem is only that when you get to the refresh method in CreaConsulta,
insted of continuing the code from that point, Excel interrups the executing
code in order to begin executing again the function lista from the beginning
and that reaction makes that the code is not executing correctly because
there is always part of the code without being runned.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Web Query using a QueryTable via HTTPS?? Bing Excel Programming 2 April 2nd 05 03:51 PM
Excel 2003: Can the same range be used for a querytable and a list Kevin Excel Programming 1 March 18th 05 01:52 PM
Excel - VBA - QueryTable error 1004 Vuillermet Jacques Excel Programming 0 March 2nd 05 02:35 PM
ODBC / OLE DB QueryTable Editor Add-In for Excel Rob van Gelder[_4_] Excel Programming 0 December 18th 04 03:55 AM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"