I created a function and saved it in the main module, as follows:
Public Function Teste() As Variant
Application.Volatile
MsgBox "rodou"
Teste = ""
End Function
Calculation Options is set to Automatic. In the cell, I placed the formula (eg. =Teste()), expecting that Teste function would run, everytime I would modify any cell because Application.Volatile sets my function as Dirty, forcing Excel to run the function.
What happens is that Teste function is not called, unless I put any of the cells that will be updated in the Change event of the worksheet (eg. =Teste(B2)).
What I want is just to run Teste function everytime I do changes in the worksheet.
Thanks in advance.
Volatile
. In fact I cannot reproduce the OP's problem, I get the message box whenever I change any cell. – GSerg Apr 9 '16 at 18:27Volatile
will have no effect. Also, no VBA function is allowed to change any cells. – GSerg Apr 9 '16 at 18:33AcriveSheet.Cells("A1")= 123
? – Paul Ogilvie Apr 9 '16 at 18:34