Avoid preview of result in Excel forumula editor

Oct 8, 2011 at 1:49 PM

Hi,

I have some functions that take quite a long time to execute. Is there any way to avoid preview in the Excel formula editor?

For example I have a function =ResponseTime("http://google.com";10;1000) will call http://google.com 10 times with 100ms deplay and return average responsetime. Entering this in the editor is a big pain as when you edit the parameters the function is executed.

Regards

/Niels

Coordinator
Oct 8, 2011 at 9:26 PM

Hi Niels,

You can check whether the function is being called from the function wizard by calling ExcelDnaUtil.IsInFunctionWizard in the beginning of your function.

If it is in the function wizard, you can shortcut the slow call and return some other value immediately.

-Govert

Oct 9, 2011 at 8:06 AM

Thanks, exactly what I was looking for!