byronwall / bUTL

Excel add-in with helpers for charting, formatting, and general pain points
http://byroni.us/bUTL
MIT License
16 stars 3 forks source link

(Discussion) on Ribbon Call Back parameters #52

Closed RaymondWise closed 8 years ago

RaymondWise commented 8 years ago

re: https://github.com/byronwall/bUTL/pull/51#issuecomment-209568652

All of the Ribbon_Callbacks have an argument like (control) - why? I'm sure they are needed, but I don't see what they are doing, pardon my ignorance.

byronwall commented 8 years ago

That syntax is just the required format of the callback for the Ribbon event. I am using the Ribbon Editor to generate those automatically (I copy and paste the callback Sub into the add-in to wire it up.) Ultimately, the Excel VBA Ribbon folks have decided that when the button is clicked, it will call an event with those parameters. I include the parameters to make it happy.

I have never actually used the control although I guess it is a real reference to a real thing. Not sure what use would require that reference to exist though?

byronwall commented 8 years ago

I'll close this in a day or so unless you had a follow up...

RaymondWise commented 8 years ago

Excellent, maybe I'll review the ribbon editor's documentation. Thanks