开发者

How do I run some VBA code when a cell is changed?

开发者 https://www.devze.com 2022-12-31 13:03 出处:网络
I want to add some VBA code when the value in a cell changes. I\'ve already tried Worksheet_Change() as described at Contextures however, this won\'t work: it only fires when the user changes the val

I want to add some VBA code when the value in a cell changes.

I've already tried Worksheet_Change() as described at Contextures however, this won't work: it only fires when the user changes the value. I want to fire it whenever the value changes, i.e.开发者_运维百科 whenever the spreadsheet recalculates.

Any ideas?


Private Sub Worksheet_Calculate()
   MsgBox "Something recalculated", vbOKOnly, "Testing Actions"

End Sub
0

精彩评论

暂无评论...
验证码 换一张
取 消