Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making Changes to Cells from a user defined function
Hi,
I know that from vba a udf (and any other code called by that udf) may not alter the worksheet in any way. However i have an addin from another product, and it has functions that do more than just return a value to that cell. Does this require a call to a dll ?? I tried implementing an asynchronous call (to ADO) and wired up an event but that just made excel crash. Thanks Elliot |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making Changes to Cells from a user defined function
Elliot,
I imagine the code in the add-In is driven by a button or menu click, or triggered by an Excel event. If started any of these ways, your code has freedom to the whole Excel interface. Whilst there may be ways of exceeding the bounds of a UDF, I would question your real need to do so, as you would be going against the design of Excel . NickHK "Elliot" wrote in message ... Hi, I know that from vba a udf (and any other code called by that udf) may not alter the worksheet in any way. However i have an addin from another product, and it has functions that do more than just return a value to that cell. Does this require a call to a dll ?? I tried implementing an asynchronous call (to ADO) and wired up an event but that just made excel crash. Thanks Elliot |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making Changes to Cells from a user defined function
You can program an event to maintain information on a cell(s) containing the
formula, then react when the results displayed are changed. I don't have a list, but there are some things a function (UDF) can do. I believe it could create a defined name for example. It could execute a query (DAO I believe). It could create a comment. (I didn't specifically test these before posting, but I believe these are true based on past posts in these groups). So something like this could be used to communicate with an event. -- Regards, Tom Ogilvy "Elliot" wrote in message ... Hi, I know that from vba a udf (and any other code called by that udf) may not alter the worksheet in any way. However i have an addin from another product, and it has functions that do more than just return a value to that cell. Does this require a call to a dll ?? I tried implementing an asynchronous call (to ADO) and wired up an event but that just made excel crash. Thanks Elliot |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making Changes to Cells from a user defined function
Nope it is a genuine user defined function. It returns a value to the
function cell and also populates cells below it. And if the function referes to ranges that change the function re-runs. The addin must must process the function and call some code that updates the cells. I'd like to replicate that . I'll have to experiment with a automation addin Thanks for the replies "NickHK" wrote in message ... Elliot, I imagine the code in the add-In is driven by a button or menu click, or triggered by an Excel event. If started any of these ways, your code has freedom to the whole Excel interface. Whilst there may be ways of exceeding the bounds of a UDF, I would question your real need to do so, as you would be going against the design of Excel . NickHK "Elliot" wrote in message ... Hi, I know that from vba a udf (and any other code called by that udf) may not alter the worksheet in any way. However i have an addin from another product, and it has functions that do more than just return a value to that cell. Does this require a call to a dll ?? I tried implementing an asynchronous call (to ADO) and wired up an event but that just made excel crash. Thanks Elliot |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Making User defined functions available in all new workbooks | Excel Worksheet Functions | |||
Cells w/ user defined function do not auto update | Excel Worksheet Functions | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Obtaining column/row numbers of cells in user defined function | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming |