Vba 宏可以工作,但无法在 main() 中启动
已为 Solidworks 创建了一个宏 - 多个子程序、函数和表单。
我确信该代码是可疑的,但当我强制它在 main() 中启动时它会起作用
当我在 Solidworks 中添加一个按钮来启动宏时,它默认为不同的子项,该子项似乎是按字母顺序排列的,我得到了类似的行为从编辑器启动宏。 看来列出的所有潜艇都是没有传入参数的潜艇。
有人可以指导我为什么会发生这种情况吗?我确信我可以通过重命名潜艇来解决这个问题,但我真的不想这样做。
Have created a Macro - multiple subs, functions and forms for Solidworks.
I'm sure the code is dubious but it works when I force it to start in main()
When I add a button in Solidworks to start the macro it defaults to a different sub, which appears to be alphabetical, I get a similar behaviour starting the macro from the editor.
It appears all the subs listed are the ones with no arguments passed in.
Could anyone please guide me on why this happens? I'm sure I could frig a way around by renaming the subs, but don't realy want to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来我又太不耐烦了!
在 Solidworks 中添加宏按钮时,您可以选择要运行的子程序...作为方法

It appears I was to impatient, again!
When adding the macro button in Solidworks you are given the choice of choosing the sub to run ... as Method
