Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Background Function

Status
Not open for further replies.

asibin2000

Programmer
Dec 10, 2007
22
US
I have a function in excel that looks up several databases and calculates a result based on a number of business rules.

Due to reasons beyond my control, the lookup function takes about 30 - 70 seconds to complete without a problem.

So my question is does anyone have some experience or links to making a VBA function multi thread so that the user doesn't have the pause while the function is working?

For example:

Cell "A2" would be a formula that equals =CustomFunction1(<CustID>)

This would return the customer name in Cell "A2" but takes a brief few seconds.

I want to limit the length of the pause or be able to have a function process in the background while the user continues to work in the sheet.

Any help or guidance would be greatly appreciated.

Asi
 
Hi,

You may be able to make your SQL or process more efficient. Please post your code. MS Query does have a BackgroundRefresh property. What query method are you using?

However, when it comes to spreadsheet functions, as it seems you are running, the clock during calculation is SOP. I'm not really sure that you can get around that.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top