nwein
Posts: 577
Joined: 2011-03-28
|
Consider the following UDF:
public static DateTime DateTester(DateTime date)
{
try
{
if (Module.IsInFunctionWizard)
return default(DateTime);
return date;
}
catch
{
return default(DateTime);
}
}
Now debug or run this add-in and launch the formula wizard.
In the DateTester formula, type in, as the date parameter: DateTester(NOW()) - type it, don't paste (you won't even get to the NOW portion before it crashes)
Observe - Excel crashes. If you're debugging an error from an unknown module is thrown:
System.ArgumentException was unhandled
Message: An unhandled exception of type 'System.ArgumentException' occurred in Unknown Module.
Additional information: Not a legal OleAut date.
It will crash even if the UDF doesn't have the InFunctionWizard check.
Note however, that typing directly in Excel will not crash it, so I can do actually type =DateTester(DateTester(NOW())) and I will get a result.
Excel 2010, 32-bit, ADX 7.4087 |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
Hello Nir,
I've reproduced this. The issue is now filed under #7620 in our bug-tracking DB. When it is fixed, I'll inform you.
Andrei Smolin
Add-in Express Team Leader |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
Hello Nir,
We've published Beta 2 of Add-in Express version 8 that fixes this bug. Could you please confirm that it works for you?
Andrei Smolin
Add-in Express Team Leader |
|