View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave D-C[_3_] Dave D-C[_3_] is offline
external usenet poster
 
Posts: 176
Default Common routine for many menu buttons

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


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----