ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Manipulate cells from UDF (https://www.excelbanter.com/excel-programming/421957-manipulate-cells-udf.html)

ToM201

Manipulate cells from UDF
 
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-

Bob Phillips[_3_]

Manipulate cells from UDF
 
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.

--
__________________________________
HTH

Bob

"ToM201" wrote in message
...
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-




sunny

Manipulate cells from UDF
 
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...

Bob Phillips[_3_]

Manipulate cells from UDF
 
I don't do C++ I am afraid.

--
__________________________________
HTH

Bob

"sunny" wrote in message
...
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...




ToM201

Manipulate cells from UDF
 
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-

"sunny" wrote:

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...


sunny

Manipulate cells from UDF
 
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.


All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com