0

When I use ActiveCell.value="my_custom_function" it inserts a @ between equal sign and my custom function,

Example:

ActiveCell.value = "=D_CHANGE()"

It returns =@D_CHANGE() to my active cell.

How can I avoid this @?

I think it is a configuration issue but don't figure out what it is.

Damian
  • 5,152
  • 1
  • 10
  • 21
  • Does using `ActiveCell.Formula2 = "=D_CHANGE()"` do the trick? If so, [here](https://stackoverflow.com/a/61138478/9758194) is the (basic) explaination. – JvdV May 05 '20 at 11:12
  • @JvdV: `ActiveCell.value = "=D_CHANGE()"` also puts the formula into the cell, at least when I tried. That was a little bit surprising. – Storax May 05 '20 at 11:54
  • @Santiago Casas Rey: Do you have a function named `D_CHANGE()` ? If yes, please post the code. – Storax May 05 '20 at 11:55
  • @Storax, yes it's basically a string getting transformed into an formula through Excel – JvdV May 05 '20 at 12:22
  • Thanks to all, specyally to @JvdV. That was the reason. I tried with `ActiveCell.value = "=D_CHANGE()"` and it worked – Santiago Casas Rey May 06 '20 at 11:53
  • @JvdV the linked question isn't the same but it helped to resolve my doubt. Sorry but I don't see how I can upvoting your answer. – Santiago Casas Rey May 06 '20 at 12:12
  • @SantiagoCasasRey, cool that you solved it nonetheless =) – JvdV May 06 '20 at 12:13

0 Answers0