Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Peter. The "XL = Returns.Parent" bit, which was also suggested by Jim
above, did the trick. "Peter T" wrote: Please see Chip Pearson's post. In particular this bit " In a Shared Add-In written in NET, Application is an Object parameter passed in at startup that references the host application. " Having not paid attention first time I've since had a better look at your VBA and NET In a UDF you cannot change the interface as you are attempting to do in a big way just to get the Application object. Not sure but to get you started you might be able to do this instead - XL = Returns.Parent.Application where "Returns" is the excel.range object passed to the UDF Even if that works better to go with Chip's pointer and maintain a global ref to the application that was passed at startup (looks very simlar to a how it would be done in a VB6 Com addin) Regards, Peter T |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Need to open the Function Arguments window from VBA for a user defined function. | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
Copy generates an automation error. | Excel Programming | |||
User-Defined Function pre-empting Built-in Function? How to undo???? | Excel Programming |