Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Determine which button was clicked on a sheet

Hi XP,

Try something like:

'=============
Public Sub Tester()
MsgBox Application.Caller
End Sub
'<<=============



---
Regards,
Norman



"XP" wrote in message
...
I have several regular buttons (i.e. not an activeX button) control on a
sheet. All of these buttons run the same user form, but I want the results
placed into separate cells depending upon which button was clicked to load
the form.

Using VBA, can someone please post example code that determines which
button
was clicked on the sheet, using the button's caption as the defining
variable?

Thanks in advance.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Determine which button was clicked on a sheet

Hi XP,

Just to add, having assigned this macro to each button of interest, clicking
the button will return a message comprising the button's name.


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi XP,

Try something like:

'=============
Public Sub Tester()
MsgBox Application.Caller
End Sub
'<<=============



---
Regards,
Norman



"XP" wrote in message
...
I have several regular buttons (i.e. not an activeX button) control on a
sheet. All of these buttons run the same user form, but I want the
results
placed into separate cells depending upon which button was clicked to
load
the form.

Using VBA, can someone please post example code that determines which
button
was clicked on the sheet, using the button's caption as the defining
variable?

Thanks in advance.





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
Determine when checkbox is clicked wAyne Excel Discussion (Misc queries) 1 February 21st 06 08:35 PM
Determine last clicked object / control Rex Excel Programming 3 July 15th 05 07:02 PM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar[_15_] Excel Programming 1 May 26th 04 09:45 AM
How to determine which dynamically generated control was clicked llowwelll[_7_] Excel Programming 4 May 23rd 04 09:26 PM
How to determine which button was clicked on the modified right-click menu Patrick Choi Excel Programming 1 September 1st 03 02:07 PM


All times are GMT +1. The time now is 01:55 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"