Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do until button clicked kaiser Excel Programming 3 August 31st 05 12:41 PM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar[_15_] Excel Programming 1 May 26th 04 09:45 AM
User Form Button Code Debs Excel Programming 1 February 26th 04 12:13 PM
Code Needed - new user nat Excel Programming 5 November 21st 03 07:37 PM
How do I check if a user clicked the Print Cancel button joanne Excel Programming 0 September 5th 03 08:24 AM


All times are GMT +1. The time now is 12:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"