View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
goshute[_2_] goshute[_2_] is offline
external usenet poster
 
Posts: 3
Default Passing Parameter with OnAction

How do I pass a parameter to a Sub from OnAction?

<button id="btnTest" label="Test Switchboard" size="large"
onAction="Switchboard" /

I have an AddIn that was written for Exce 2000 that I am trying to
migrate to 2007. In it are sveral procedures that are called by other
processes and/or menu buttons.

Since I have to have to add : "control As IRibbonControl" to each
procedure, how do I use the same procedure throughout the application
and still call them from the ribbon?

It seems to me the easiest way, is to pass a parameter to a
swithchboard that tells me which button was clicked then call the
procedure from the switchboard. This way the actual procedure remains
unchanged.

Excel 2007

Thanks
Mike