Handle Button Click
OnAction property of the Button object assigns VBA procedure to the button object.
When you press button, xlCompiler calls this routine.
With .AddButton .Name = BTN_REG_PAYMENTS_CALENDAR .Image = "Calendar" .ImageDisabled = "CalendarDisabled" .OnAction = "ShowRegPaymentCalendar" .Tooltip = "Payments Calendar" End With
Sub ShowRegPaymentCalendar() ' do somtehing End Sub
OnAction property is used by all ribbon controls.
When selection in the Combobox is changed - routine defined by OnAction button is called.