So I searched online and most answers I got said that there is no concurrency in Excel. But some posts say that EXCEL 2007 offers multi-threading for faster calculations. I'm really confused, is it possible or not?
In my workbook, there are some cells are calculated using user defined functions (UDFs). These cells are updated through a RTD server once per second. So does this mean that these functions appear to be re-calculated paralleled, but in fact, Excel just schedules them sequentially? Does it make a difference if the computer has multiple cores or not?
If, in fact, these functions are running sequentially, would the following two be equivalent? In terms of performance and speed.
1)
cell1 = userFunc(1, switch1)
cell2 = userFunc(2, switch2)
cell3 = userFunc(2, switch3)
and 2)
cell = func()
where func() is
public function
if(switch1) call userfunc1
if(switch2) call userfunc2
....
end function
And let's assume all the necessary adjustments to the functions are made. I mean, would the first one be faster?
Thanks a lot!!!
UPDATE: So if there's no real concurrency in VBA, does that mean functions are called sequentially and shared global variables can be accessed without locking problem? I have an API object that's used by virtually every function, so can I shared it instead of initialize it everytime I use it? This object is just an API used to call some static functions, there's no modification or anything to the object itself.