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

Hi,

I have made an Add-in for Excel that creates a QueryTable in a range. It is
a function that returns true o false if the query has been made ok or not.

To make this addin works it is necessary that you write a formula in an
excel cell, this formula call another function that creates a Query table in
a range expecified.

The code works ok but there is a problem.

Firstly I create a connection to the database, then assign the Recordset to
de QueryTable and then I call the refresh method in order to see the results.

When the refresh is called, the code stops running and begin to recalculate
the formula from where i called de query table.

For example:

=GetData("select * from table1")

This function returns true or false in that cell, but also create a
QueryTable under the cell I wrote the formula.
When QueryTable.Refresh is executed, the code suddenly begin to execute
"GetData" again without finishing the other code, so I get an error.
If I have only one of this formulas in my worksheet, it runs ok because in
the second pass the code is runned entirely, but if i have more formulas the
secuence is the following:

Ex: Formula1, Formula2, Formula2

Formula1 - Is executed until the Refresh method and then pass to the
formula2 without finishing the code of formula1

Formula2 - Is executed until the Refresh method and then pass to the
formula3 without finishing the code of formula3

Formula3 - Finish completely the code and returns ok

Has anyone any idea of what is happening?

Thank you in advance.


 
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 06:39 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"