Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
awaiting the execution of code...
I have a Selection.FormulaArray line of code that has to wait on a link to
supply data to compute the array formula and populate the cells it controls. Well, from those data, I calculate min and max cell values to carry over to a chart to define the limits on the Y-axis. My issue is the code executes down and to the point where it wants those min and max values, but they are not available... yet... so I get an error message. I have tried Application.Wait Now + TimeValue ("00:00:15") and other similar tactics hoping to slow the execution of the code until the Selection.FormulaArray grabs its data and performs the calculations, but in every case, whatever method I employ seems to stop the calculation process, so I gain no advantage by attempting to sort of pause the code execution until the data are ready for the min and max variables. What a mess... I am looking for some way to work around this. My thanks in advance for any suggestions. B. Reid |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
awaiting the execution of code...
Have you tried placing DoEvents before the chart processing?
Brad wrote: I have a Selection.FormulaArray line of code that has to wait on a link to supply data to compute the array formula and populate the cells it controls. Well, from those data, I calculate min and max cell values to carry over to a chart to define the limits on the Y-axis. My issue is the code executes down and to the point where it wants those min and max values, but they are not available... yet... so I get an error message. I have tried Application.Wait Now + TimeValue ("00:00:15") and other similar tactics hoping to slow the execution of the code until the Selection.FormulaArray grabs its data and performs the calculations, but in every case, whatever method I employ seems to stop the calculation process, so I gain no advantage by attempting to sort of pause the code execution until the data are ready for the min and max variables. What a mess... I am looking for some way to work around this. My thanks in advance for any suggestions. B. Reid |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pausing a Macro awaiting user input | Excel Programming | |||
Code Execution Error | Excel Programming | |||
code execution has been interrupted | Excel Programming | |||
code execution has been interrupted | Excel Discussion (Misc queries) | |||
Why does code execution stop? HELP! | Excel Programming |