Manipulate cells from UDF

T

ToM201

good morning newsgroup :)

after searching the internet up and down withouth findind a solution, i'd
like to post my question here.

our customer needs an user defined function (UDF) in excel 2003 which is
able to manipulate the cells in the worksheet withouth returning an array.

basically we want to enter stock market symbols and field names in the
worksheet, the UDF should pick them up and populate the empty cells with the
requested data.

it works very well when the UDF returns an array, but the customer says he
doesn't want to use these array functions......:(

how can i manipulate the values of a range from the UDF directly withouth
returning an array of data ?

any help is highly appreciated :))

thank you in advance & best wishes
-ToM-
 
B

Bob Phillips

You can't. A UDF can return a value, or values in the case of an array, but
it cannot manipulate cells directly.

You could use worksheet change events.
 
S

sunny

I'm doing the exactly same thing......
The customer may want bloomberg-like functionality.....
I'm doing this way....
The worksheet function returns the first record and stores the other
records in the internal storage like arrays..
Then, trap the SheetChange event (or other event like SheetCalculate)
and put the rest of the results.....

I'm doing this using COM add-in with native C++... but... I can't do
the event handling part correctly...
Displaying the rest of the results is ok... but, after that, EXCEL
crash....!

Please help me.... Show me how to handle SheetChange event...
 
T

ToM201

hello :)

thank you all for your answers. Yes that's it exactly, it should do the same
thing as the bloomberg/reuters/telekurs formulas.

I will use your inputs and try if i can make it work and post the results
here as it may help you too sunny :)

thank you & best wishes
-ToM-
 
S

sunny

Here, I found an article about how to handle EXCEL events using MFC...

http://support.microsoft.com/kb/309301

But It seems quite different from ATL..... I'm not familiar with MFC
and I want it to be as light as possible...

Anyway it could be helpful for you..

Good luck! And I'm looking forward your successful posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top