Public Sub CallbackReg(callback As Object)Īlso, your document needs to be digitally signed or trusted in order to run CallbackReg macro. Next you need to open your workbook and add new module with following code: ThisApplication.Run ('CallbackReg', new MyUdf()) // this will start 'CallbackReg' macro in your workbook Then put the following line in ThisWorkbook_Startup method: How do we expose a UDF out of an VSTO v3 addin so that it can be used in a cellįirst you need to create a class (must be ComVisible) with your methods.
Posted: Visual Studio Tools for Office, Excel 2007 VSTO Addin UDF Index ‹ Visual Studio Tools for Office ‹ Visual Studio Tools for Office