ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Update Sheet from Formula. (https://www.excelbanter.com/excel-programming/303607-update-sheet-formula.html)

compound

Update Sheet from Formula.
 
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

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Update Sheet from Formula.
 
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???

"compound <" wrote:

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

I have user defined function in the cell A1 (something like
=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-defined
error".

Does anybody know how to get around this problem?

Any suggestions will be appreciated.
Thank you.
Compound

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson


compound[_2_]

Update Sheet from Formula.
 
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

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

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



"compound <" wrote:

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

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

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson



All times are GMT +1. The time now is 05:20 PM.

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