gpt4 book ai didi

excel - 我可以将 excel 加载项中的函数分配给工作簿中的按钮吗?

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

我想在工作表中有一个按钮,您可以按下该按钮将运行部分加载项。这可能吗?

最佳答案

ok ill look into that. but is there a way to do so with a button in a sheet? – Jacxel 7 mins ago



是的你可以。

我假设您有一个名为 MyAddIn.xlam 的加载项并且您在插件模块中有一个名为“Sample()”的过程。我还假设已安装加载项。

替换文件 MyAddIn.xlam使用相关的加载项名称并替换过程 Sample带有相关的过程名称。
Option Explicit

Private Sub CommandButton1_Click()
Application.Run "MyAddIn.xlam!Sample()"
End Sub

关于excel - 我可以将 excel 加载项中的函数分配给工作簿中的按钮吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10636336/

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