I am working on a trading algorithm in Excel and VBA. A cell in the Excel document gets updated from a trader client with the time remaining. I want to call a method every time that cell changes its value. How is this done?
See the solution on this page:
automatically execute an Excel macro on a cell change
To trigger an event when cell A1 changes,
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Target.Worksheet.Range("A1")) Is Nothing Then Macro
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.