excel宏选中单元格_从单元格引用运行Excel宏

excel宏选中单元格

Last week I wrote an article about hiding Excel macros, so they don't appear in the macro list. While working on that article I noticed that the Macro dialog box has a Collapse Dialog button.

上周,我写了一篇有关隐藏Excel宏的文章,因此它们不会出现在宏列表中。 在撰写该文章时,我注意到“宏”对话框具有“折叠对话框”按钮。

While the Macro name box is active, you can go to the workbook, select a sheet, and click on a cell.

宏名称框处于活动状态时,您可以转到工作簿,选择一个工作表,然后单击一个单元格。

I couldn't figure out why that button was there. Even if I typed a macro name in a cell, then clicked on that cell, that macro didn't run.

我不知道为什么那个按钮在那里。 即使我在一个单元格中键入了宏名称,然后单击该单元格,该宏也没有运行。

请参阅宏表 (Refer to Macro Sheets)

Dave Peterson suggested that the Collapse Dialog button might be related to Excel's old style XLM macros. And he was right – I finally found the confirmation in my old Excel 3.0 manual.

Dave Peterson建议“折叠对话框”按钮可能与Excel的旧样式XLM宏有关。 他是对的–我终于在旧的Excel 3.0手册中找到了确认信息。

It says "You can also enter in the Reference box the reference of the first cell of the command macro you want to run."

它说:“您还可以在“引用”框中输入要运行的命令宏的第一个单元格的引用。”

The old style macros were written on Macro sheets.

旧样式的宏写在宏表上。

From the Macro dialog box, you could click on the starting cell of a macro, then click the Run button.

在“宏”对话框中,您可以单击宏的起始单元格,然后单击“运行”按钮。

I guess the button is still there for compatibility with those old macros, and maybe it will eventually disappear from the Macro dialog box.

我猜该按钮仍然存在,以便与那些旧的宏兼容,并且也许最终它将从“宏”对话框中消失。

翻译自: https://contexturesblog.com/archives/2009/01/23/run-an-excel-macro-from-a-cell-reference/

excel宏选中单元格

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值