View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rod Jones Rod Jones is offline
external usenet poster
 
Posts: 3
Default "what triggered the event"

I need command buttons on a spreadsheet to change color on
the mouse_down and then back on the mouse_up events. But
rather the writing the code for the mousedown/up event for
each individual button, I want to write two subs (one for
mouse_down and other for mouse_up) that that will be
called by the buttons e.g.

Private Sub Button_Mouse_Down()
"WhichButtonCalledMe".backColor = RGB(255,0,0)
End sub

Private Sub Button_Mouse_Up()
"WhichButtonCalledMe".Backcolor = RGB(0,255,0)
End Sub

How do I find out what button called the subs?
Hope this makes sense to someone out there.