fernandreu / office-ribbonx-editor

An overhauled fork of the original Custom UI Editor for Microsoft Office, built with WPF
MIT License
520 stars 100 forks source link

how to reload excel ribbon dynamic dropdown boxes #232

Open michael-hgl opened 4 months ago

michael-hgl commented 4 months ago

The VBA ribbon callback functions load the dynamic dropdown boxes when you first select your Tab on the Excel ribbon.

But I need to know how to later clear and reload these dropdown boxes with different info.

Anybody know how to do this or point me to some info?

Thanks, Michael

thefasquelle commented 4 months ago

@michael-hgl This is not the proper place to ask this. This repo is only about Office RibbonX Editor, not VBA programming. You should ask this on stackoverflow or a dedicated forum (mrexcel.com, excelforum.com ...). I will answer your question but in the future please don't put off-topic question here.

You need to use the OnLoad callback to store your ribbon object. Then, at any time in your VBA code you can call Ribbon.InvalidateControl(dropDownId) to invalidate just your drop down menu, or Ribbon.InvalidateRibbon() to invalidate the entire ribbon. The next time Excel needs to display an invalidated control, it will call its callback again.

You may search for community posts about these topics and read the official documentation about ribbon customization

michael-hgl commented 3 months ago

Okay, thanks for the info, and sorry about posting in wrong forum.

Michael

From: thefasquelle @.> Sent: Tuesday, June 4, 2024 1:00 PM To: fernandreu/office-ribbonx-editor @.> Cc: Kline, Michael @.>; Mention @.> Subject: [EXTERNAL] Re: [fernandreu/office-ribbonx-editor] how to reload excel ribbon dynamic dropdown boxes (Issue #232)

@michael-hglhttps://urldefense.us/v3/__https:/github.com/michael-hgl__;!!NBQa5TqzLk8oMfeeCmqrJQ!5ixKsuJFF8Ia6ik1ELWoGoWA49x_gdw_apQAZi2jCf4R3oB8b8K8pL5yeWZ6YjzEZK2PHgGUHp88JTQKgzjI$ This is not the proper place to ask this. This repo is only about Office RibbonX Editor, not VBA programming. You should ask this on stackoverflow or a dedicated forum (mrexcel.com, excelforum.com ...). I will answer your question but in the future please don't put off-topic question here.

You need to use the OnLoad callback to store your ribbon object. Then, at any time in your VBA code you can call Ribbon.InvalidateControl(dropDownId) to invalidate just your drop down menu, or Ribbon.InvalidateRibbon() to invalidate the entire ribbon. The next time Excel needs to display an invalidated control, it will call its callback again.

You may search for community posts about these topics and read the official documentation about ribbon customization

— Reply to this email directly, view it on GitHubhttps://urldefense.us/v3/__https:/github.com/fernandreu/office-ribbonx-editor/issues/232*issuecomment-2148002197__;Iw!!NBQa5TqzLk8oMfeeCmqrJQ!5ixKsuJFF8Ia6ik1ELWoGoWA49x_gdw_apQAZi2jCf4R3oB8b8K8pL5yeWZ6YjzEZK2PHgGUHp88JVmUoCLB$, or unsubscribehttps://urldefense.us/v3/__https:/github.com/notifications/unsubscribe-auth/BIRK7F3IIG5SNSHIAV6NMUTZFXXAXAVCNFSM6AAAAABH26M532VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYGAYDEMJZG4__;!!NBQa5TqzLk8oMfeeCmqrJQ!5ixKsuJFF8Ia6ik1ELWoGoWA49x_gdw_apQAZi2jCf4R3oB8b8K8pL5yeWZ6YjzEZK2PHgGUHp88JYG_EJC5$. You are receiving this because you were mentioned.Message ID: @.**@.>>