Simulate Execute Ribbon Button Click by VBA

AnthonyGerrard

Registered User.
Local time
Today, 10:46
Joined
Jun 11, 2004
Messages
1,069
I know how to use a callback to to action a button click directly.

But I also have a drop down list of my buttons on a form (they are dynamically created, so the details are stored in a table), I want to select a button from my drop down lists and then action the button selected.

Cheers for any help?

EDIT: In short - I want to execute a ribbon button via vba knowing its Control.ID.
 
Last edited:
Eh?

try explaining that again and see if anyone helps. It doesn't make sense im afraid :)


cheers
 
Hi,

not sure if you can do that with a ribbon using the ControlID. Can you not call the function that the ribbon control is using instead?


cheers
 
Hi,

not sure if you can do that with a ribbon using the ControlID. Can you not call the function that the ribbon control is using instead?


cheers

My buttons all use the same callback - which has case statement for each Control.ID, which then call other routines.

I maybe be able to call that - but I dont know how - thats my question? Ta
 
If you have a specific ribbon callback routine that you want to be able to execute from other code, remove it from your ribbon control click handler and make it a public routine.
Then get your ribbon click handler to call it as required, and any other consumers can also call it.
Does that make sense?
 
If you have a specific ribbon callback routine that you want to be able to execute from other code, remove it from your ribbon control click handler and make it a public routine.
Then get your ribbon click handler to call it as required, and any other consumers can also call it.
Does that make sense?

Makes sense to me LB :D
 
If you have a specific ribbon callback routine that you want to be able to execute from other code, remove it from your ribbon control click handler and make it a public routine.
Then get your ribbon click handler to call it as required, and any other consumers can also call it.
Does that make sense?

Yes it does, Thanks have done that, easy when you know how!
 

Users who are viewing this thread

Back
Top Bottom