public void OpenDialog(IRibbonControl control)
{
dynamic cellActive = Application.ActiveCell;
cellActive.FunctionWizard();
}
// OPEN EXCEL FUNCTION ARGUMENTS DIALOG BOX FOR UDF
public void Func212(IRibbonControl control)
{
strFunc = "=C_RevStr('TAC')";
dynamic cellActive = Application.ActiveCell;
// THIS IS THROWING CUSTOM UI RUNTIME ERROR FROM EXCEL
cellActive.formula = strFunc;
}


--------------------------------------------------
Excel-DNA is now registered on GitHub Sponsors.
Every monthly contribution directly funds further development.
--------------------------------------------------
Hi Andrew,
I think the problem is the single quotes – they won’t work in an Excel formula.
You can try:
string strFunc = "=C_RevStr(\"TAC\")";
-Govert


--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/5f57675b-d155-4db4-bfa5-ba1f63d93a57n%40googlegroups.com.
public void Func212(IRibbonControl control)
{
//strFunc = "=C_RevStr(\"TAC\")"; // Excel doesn't recognized single quotation marks
strFunc = "=C_RevStr()";
dynamic cellActive = Application.ActiveCell;
cellActive.formula = strFunc; // just puts function string in cell
cellActive.FunctionWizard(); // opens up the arguments dialog box for UDF
}
