ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing spreadsheet cell through UDF (https://www.excelbanter.com/excel-programming/310716-changing-spreadsheet-cell-through-udf.html)

Nacho Nachev

Changing spreadsheet cell through UDF
 
Hello,

I have some problem with a VBA function that I use within a formula. What is
special about my function is that it also should modify particular cell in
the current spreadsheet. However it does not work. My fragment of code
dealing with this is he

Application.ActiveSheet.Cells(49, 3) = 10

I have also tried other approaches but with no luck. Neither the
spreadsheet, nor the cell are protected.

Is there any workaround for this problem?

Thank you for your time,
Nacho



Norman Jones

Changing spreadsheet cell through UDF
 
Hi Nacho.

a UDF returns a value it cannot change another cell.

---
Regards,
Norman



"Nacho Nachev" wrote in message
...
Hello,

I have some problem with a VBA function that I use within a formula. What
is
special about my function is that it also should modify particular cell in
the current spreadsheet. However it does not work. My fragment of code
dealing with this is he

Application.ActiveSheet.Cells(49, 3) = 10

I have also tried other approaches but with no luck. Neither the
spreadsheet, nor the cell are protected.

Is there any workaround for this problem?

Thank you for your time,
Nacho





Nacho Nachev

Changing spreadsheet cell through UDF
 
Well, and is there any workaround possible?

Thanks,
Nacho


"Norman Jones" wrote in message
...
Hi Nacho.

a UDF returns a value it cannot change another cell.

---
Regards,
Norman



"Nacho Nachev" wrote in message
...
Hello,

I have some problem with a VBA function that I use within a formula.

What
is
special about my function is that it also should modify particular cell

in
the current spreadsheet. However it does not work. My fragment of code
dealing with this is he

Application.ActiveSheet.Cells(49, 3) = 10

I have also tried other approaches but with no luck. Neither the
spreadsheet, nor the cell are protected.

Is there any workaround for this problem?

Thank you for your time,
Nacho







Norman Jones

Changing spreadsheet cell through UDF
 
Hi Nacho,

Depending on your situation, you may be able to use a Worksheet_Change
procedure.

---
Regards,
Norman



"Nacho Nachev" wrote in message
...
Well, and is there any workaround possible?

Thanks,
Nacho


"Norman Jones" wrote in message
...
Hi Nacho.

a UDF returns a value it cannot change another cell.

---
Regards,
Norman



"Nacho Nachev" wrote in message
...
Hello,

I have some problem with a VBA function that I use within a formula.

What
is
special about my function is that it also should modify particular cell

in
the current spreadsheet. However it does not work. My fragment of code
dealing with this is he

Application.ActiveSheet.Cells(49, 3) = 10

I have also tried other approaches but with no luck. Neither the
spreadsheet, nor the cell are protected.

Is there any workaround for this problem?

Thank you for your time,
Nacho









Nacho Nachev

Changing spreadsheet cell through UDF
 
Yes, that's seems possible option. Thank you!

Nacho

"Norman Jones" wrote in message
...
Hi Nacho,

Depending on your situation, you may be able to use a Worksheet_Change
procedure.

---
Regards,
Norman



"Nacho Nachev" wrote in message
...
Well, and is there any workaround possible?

Thanks,
Nacho


"Norman Jones" wrote in message
...
Hi Nacho.

a UDF returns a value it cannot change another cell.

---
Regards,
Norman



"Nacho Nachev" wrote in message
...
Hello,

I have some problem with a VBA function that I use within a formula.

What
is
special about my function is that it also should modify particular

cell
in
the current spreadsheet. However it does not work. My fragment of

code
dealing with this is he

Application.ActiveSheet.Cells(49, 3) = 10

I have also tried other approaches but with no luck. Neither the
spreadsheet, nor the cell are protected.

Is there any workaround for this problem?

Thank you for your time,
Nacho












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

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