如何模拟tab onAction属性? [英] How to mimic tab onAction attribute?
问题描述
如果相应的选项卡被激活,我需要激活一个特定的表格
XML
I need to activate a specific Sheet if corresponding tab is activated
XML
<tab id="books" label="books" onAction = "goTo1">
VBA
Sub goTo1()
Sheet1.Activate
End Sub
似乎onAction属性的tab元素不存在(noComment)
有另一种方法来做到这一点吗?
It seems onAction attribute for tab element doesn't exist (noComment)
Is there another way to do this?
推荐答案
这将是使用功能区界面另一种方式 - 它不可能开箱即用。丝带的想法是,只有在当前工作表中有效的操作和选项卡才可以。
This would be using the Ribbon Interface "the other way round" - its not possible out of the box. The Idea of the ribbons is, that only actions and tabs are visible that make sense in the current sheet.
你可以做的是在隐藏的表单上有一个计时器检查活动色带并激活适当的纸张。获取活动标签并不是微不足道的,但请查看此处了解详情。
What you can do is have a timer on a hidden form that checks the active ribbon and activates the appropriate sheet. Getting the active tab is not trivial though - Look here for details.
这篇关于如何模拟tab onAction属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!