📜  excel vba 每次更改工作表时运行一个宏 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:54.553000             🧑  作者: Mango

代码示例1
'In the VBA code module for that particular worksheet, add this:

Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    
    'The name of your Macro or subroutine goes here <--
    
    Application.EnableEvents = True
End Sub