Determining the command bar button that called a function

P

Paul

Is there a way of determining which command bar button (on a shortcut menu)
called a function?

I am populating the menu programmatically and setting the .OnAction property
of the buttons to a common function.

I would like to determine which button (it's caption or tag would be fine)
called the function.

I had hoped to get away with:

..OnAction = "SelectedOption(" & strButton & ")"

when creating the button and then having a function:

Public Function SelectedOption(strButton as string)

But you don't seem to be able to pass function parameters this way :-(

TIA

Paul
 

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

Top