gpt4 book ai didi

Excel 宏 4.0 事件处理

转载 作者:行者123 更新时间:2023-12-04 20:19:33 24 4
gpt4 key购买 nike

按照这些步骤,您可以在工作簿中创建 Excel 4.0 宏:

  • 右键单击 Excel 工作簿底部的工作表/选项卡(例如 Sheet1 )。
  • 点击Insert... .
  • 选择 MS Excel 4.0 Macro并点击 OK .

  • 您将获得一个启用了宏的新工作表“Macro1”。

    你如何处理像 SheetSelectionChangeEvent 这样的事件?在代码中的这张表?

    我能够订阅和处理常规工作表的这些事件( Sheet1Sheet2 等),但对于 Macro1表,这些常规事件不会被触发。有任何想法吗?

    最佳答案

    可从此处获得引用:http://support.microsoft.com/kb/128185

    ON functions allow you to specify a macro to be run when a certain event occurs. The ON functions turn on and off this special event handling.ON functions are turned on by specifying the type of event to wait for, such as recalculation, a specific time, or a key to be pressed, and the macro to be run when the event occurs. ON functions are turned off by using the same formula but omitting the argument specifying the macro to be run.


    ON.DATA         Runs a macro when data is entered
    ON.DOUBLECLICK Runs a macro when you double-click any cell or object
    on the specified document or double-click any item
    on the specified chart
    ON.ENTRY Runs a macro when a document is recalculated
    ON.KEY Runs a macro when a specified key is pressed
    ON.RECALC Runs a macro when a document is recalculated
    ON.SHEET Runs a macro when a specified sheet is selected
    ON.TIME Runs a macro at a specific time
    ON.WINDOW Runs a macro when you switch to a window

    关于Excel 宏 4.0 事件处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10727524/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com