ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UDF that can populate the sheet with data? (https://www.excelbanter.com/excel-programming/325822-udf-can-populate-sheet-data.html)

Paul Roberts

UDF that can populate the sheet with data?
 
Hi,

I am attempting to write an excel addin that the user can type various
formula in a spreadsheet and it will return the data requested. To make it
that bit more complicated the returned data is variable in columns and rows.
No matter what I try it seems that the sheet is always locked when in my
add-in/function is running. I have even tried spawning another thread and
waiting for the sheet to be unlocked but it never seems to.

I know that there are other add-ins out there that can do this, an example
that I have seen in the Bloomberg add-in.

Cheers
Paul



OJ[_2_]

UDF that can populate the sheet with data?
 
Hi,
A UDF cannot make changes to the worksheet, only return values to the
cell(s) in which it is entered. The bloomberg functions you are talking
about (BLP,BLPH) use a DDE server and a couple of C DLL's to 'populate'
the worksheet via an VBA Excel addin.

Hth,
OJ


Paul Roberts

UDF that can populate the sheet with data?
 
Thanks. But they are still implemented as functions. So they somehow
manage to modify the sheet from within a function or at least kick off the
update. As I said in the original post I have attempted creating another
thread and letting the function return the first bit of data, and then the
thread was going to dump the rest of the data in. But from what I could see
the sheet was locked even after the function was returned.

Anyone else have any ideas of how to do this or how to write a DDE like
thing to do the populating.

Cheers
Paul


"OJ" wrote in message
oups.com...
Hi,
A UDF cannot make changes to the worksheet, only return values to the
cell(s) in which it is entered. The bloomberg functions you are talking
about (BLP,BLPH) use a DDE server and a couple of C DLL's to 'populate'
the worksheet via an VBA Excel addin.

Hth,
OJ




OJ[_2_]

UDF that can populate the sheet with data?
 
Hi,
afaik, the functions pass arguments to the C DLL's which then 'take
over' Excel and return the data from the DLL. You cannot do it with out
the C code.

I'm no expert, and i would love to be wrong, but unless you are
prepared to do some COM automation & DLL writing then I don't think you
will be successful..

Perhaps this might shed some light...

http://www.cpearson.com/excel/differen.htm
OJ


Jens Thiel[_2_]

UDF that can populate the sheet with data?
 
"Paul Roberts" wrote in message
...
Anyone else have any ideas of how to do this or how to write a DDE like
thing to do the populating.


Do you think of something like that?

http://www.stochastix.de/solutions/e...c.updates.html

Best regards,
Jens.




All times are GMT +1. The time now is 10:20 AM.

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