Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making User defined functions available in all new workbooks Alco Engineer[_2_] Excel Worksheet Functions 5 March 10th 09 10:15 PM
Cells w/ user defined function do not auto update John Excel Worksheet Functions 2 September 14th 08 07:06 PM
Excel - User Defined Function Error: This function takes no argume BruceInCalgary Excel Programming 3 August 23rd 06 08:53 PM
Obtaining column/row numbers of cells in user defined function GreenInIowa Excel Programming 6 October 19th 05 09:20 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM


All times are GMT +1. The time now is 07:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"