View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Code needed to test if user clicked a button

Subs,
If it's a button on a worksheet from the forms toolbar then
Application.Caller returns the button's name. If you want to identify
the button using its caption eg "Start" then try:
Dim WhichButton as Shape
Set WhichButton = ActiveSheet.Shapes(Application.Caller)
If WhichButton.TextFrame.Characters.Text = "Start" then do something..
Other than that I really don't know. I mainly work on a Mac so I know
nothing about ActiveX controls.
Ken Johnson