Update Sheet from Formula.

C

compound

Great day everybody.
I have a question to the Excel Gurus!

I have user defined function in the cell A1 (something lik
=myfunction() ).
I would like to insert value in to cell A2 by running this function.
For example by running
ActiveSheet.Cells(2, 1) = 5

If I do that then I get an "Application-defined or object-define
error".

Does anybody know how to get around this problem?

Any suggestions will be appreciated.
Thank you.
Compoun
 
D

Dave Peterson

UDF's (called from a worksheet cell) can't do much except return values to the
cell that holds the formula.

Maybe you could use a formula based on A1 or use a subroutine of some sort???
 
C

compound

Thank you Dave!
The formula is A1 wouldn't work for me. I created a simpear example. I
reality everything is connected to the DB and there are lots of thing
in VB...

I've heard a long time ago that it's possible to reprogram the way th
Excel application works. I thought might be that could be the solution
 
D

Dave Peterson

You can program in excel--but that's following the rules of Excel and VBA. It's
not really reprogramming excel.
 
Top