Alessandro Di Bella
Posts: 2
Joined: 2014-01-20
|
Hi,
I'm trying to create a UDF as part of an excel add-in. Within the body of my function, I need to access the value of a custom property defined at workbook level but I don't seem to figure out how.
It is my understanding that the function itself has to be static so it does not have any access to the instance fields of the containing XLLModule.
I tried to initialize a static variable within OnInitialize but at they point where the handler is called the active workbook is not yet been set.
Any help would be greatly appreciated.
As a disclaimer I must say that I am very new to .NET so I apologise if the solution to the problem is obvious.
Regards,
Alex |
|
Andrei Smolin
Add-in Express team
Posts: 18829
Joined: 2006-05-11
|
Hello Alex,
Alessandro Di Bella writes:
Within the body of my function, I need to access the value of a custom property defined at workbook level
Are you talking about accessing Workbook.CustomDocumentProperties? Please check the section Determining What Cell / Worksheet / Workbook Your UDF Is Called From in the manual, see see the PDF file in the folder {Add-in Express}\Docs\ on your development PC.
Andrei Smolin
Add-in Express Team Leader |
|