Command BarEvents Object

Within the VBE, the OnAction property of a command bar button has no effect — the routine named in this property is not run when the button is clicked. Instead, the VBE object model provides you with the CommandBarEvents object, which hooks into whichever command bar button you tell it to, either your own custom buttons or built-in items, and raises events for the button's actions. In Office 2007 it only raises the Click event, and hence provides exactly the same functionality as Excel's OnAction and the Click event of the CommandBarButton. It was introduced for Excel 97 and is now rarely used.

0 0

Post a comment