I’m writing a set of functions in c++ which can be called by excel. However, these functions are asynchronous, therefore no immediate return values available. Once a result is available I used a callback function through VBA which update the result to the relevant cell which called the functions.
But, here I’m having circular function calling problem, because when I update the cell. excel automatically call the original function once again. Please help me to get around this problem
Thank You
Without knowing more about the data flow of your program it’s impossible to answer in detail. When are c++ functions called, what data is passed to them and when are you updating the relevant cell?
Regardless, how are you calling the C++ functions? If it’s via VBA, try turning off automatic calculation:
and then turning it back on at the end of the callback: