X
Xiaozhong
I need to make an asynchronous function in vba for excel which makes
queries to an online database. Since the database query could be very
slow due to network lags, this function usually takes several seconds
to return the value.
However this function is intensively used in my excel workbook.
(intensive means it is inputed as formula in some 50,000 cells). Since
excel evaluates formulas one by one in a sequential fashion, it takes
impractically long time for the whole workbook to get updated.
I just wondered if I can make a function that work in asynchronous
fashion. The function will submit the query and return a string like
"Waiting for response..." indicating that response from the server is
still on the way. Without waiting for response, the function returned
very fast.
When the response arrived, some event will be raised and the these
functions will take the event directly and update the cell value with
the data returned.
Does anyone know how to make such a function?
queries to an online database. Since the database query could be very
slow due to network lags, this function usually takes several seconds
to return the value.
However this function is intensively used in my excel workbook.
(intensive means it is inputed as formula in some 50,000 cells). Since
excel evaluates formulas one by one in a sequential fashion, it takes
impractically long time for the whole workbook to get updated.
I just wondered if I can make a function that work in asynchronous
fashion. The function will submit the query and return a string like
"Waiting for response..." indicating that response from the server is
still on the way. Without waiting for response, the function returned
very fast.
When the response arrived, some event will be raised and the these
functions will take the event directly and update the cell value with
the data returned.
Does anyone know how to make such a function?