在功能区控件上切换禁用/启用

问题描述:

新年快乐!

随着新年的开始,我正在努力解决回调问题。  我知道我可以使用Albert Kallal的RibbonClass,但我只需要一个控件,并想学习如何使用回调。  我给了我最好的镜头,然后再转到
论坛。

With the start of the new year I'm trying to tackle callbacks.  I know I could use Albert Kallal's RibbonClass but I only need one control and would like to learn how to work with callbacks.  I gave this my best shot before turning once again to the forum.

嗨Joe,

感谢您发布新年快乐!

我在您身边使用您的代码并确实重现了问题。我通过在激活程序中添加一行来更改这样的代码:

I use your code on my side and indeed reproduce the problem. I changed the code like this by adding a line in the Activate procedure:

Private Sub Form_Activate()

DoCmd.Maximize

bolEnabled = True

gobjRibbon.InvalidateControl" cmdCloseForm"

End Sub

Private Sub Form_Activate()
DoCmd.Maximize
bolEnabled = True
gobjRibbon.InvalidateControl "cmdCloseForm"
End Sub

这似乎运作良好。看看这对你有用,并在你尝试后随时跟进。

which seems work well. See wether this works well on your side and feel free to follow up after you have tried.

最好的问候,