Common routine for many menu buttons

  • Thread starter Thread starter Dave D-C
  • Start date Start date
D

Dave D-C

Hello,
I have 20 ControlButtons on a CommandBar, and the actions are similar,
but a parameter is needed. So I could brute force with 20 routines:
CBControl1.OnAction = "Do1"
CBControl2.OnAction = "Do2"
etc.
Sub Do1()
Call DoAll(1) ' common routine
End Sub
Sub Do2()
Call DoAll(2) ' common routine
End Sub
etc.

Is there a way for a DoAll routine to get the tag or the parameter
from the menu button that was pushed? How does one use
CBControl.Parameter?

TIA, Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top