Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code needed to test if user clicked a button
Hi all
Please can anybody help I need the correct syntax, to check If a user has clicked on a button . Regards Subs |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code needed to test if user clicked a button
You would need to handle that in the click event of the the button. Then
you wouldn't have to text, because the code would execute when they click the button. Beyond that, you would need to be much more specific about what type of button you are working with and when you would want to determine this information and why -- what you want to do. -- Regards, Tom Ogilvy "Subs" wrote in message ... Hi all Please can anybody help I need the correct syntax, to check If a user has clicked on a button . Regards Subs |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Do until button clicked | Excel Programming | |||
Pause macro, add form button to sheet, continue macro when button clicked! | Excel Programming | |||
User Form Button Code | Excel Programming | |||
Code Needed - new user | Excel Programming | |||
How do I check if a user clicked the Print Cancel button | Excel Programming |