Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
An easy one!
I have 16 contol buttons that all launch the same sub. How can I make the code recognise which button was pressed?
Is there a way to rename (not the text) a button differently from what Excel assigns? Any help is appriciated Schwartz |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
An easy one!
Dr Schwartz,
I assume that you are either using worksheet control toolbox buttons or userform buttons (as worksheet Forms button prompt for a macro to be assigned). In both of these cases, if you double-click the object whilst in design mode, you will be presented with a skeleton click event module, where you can add your code. To rename them, when selected, go into the Properties pane, and change the name. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Dr. Schwartz" wrote in message ... I have 16 contol buttons that all launch the same sub. How can I make the code recognise which button was pressed? Is there a way to rename (not the text) a button differently from what Excel assigns? Any help is appriciated Schwartz |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
An easy one!
This file might be a help:
http://www.bygsoftware.com/examples/...s/apcaller.zip It's in the "Worksheet with VBA" section on page: http://www.bygsoftware.com/examples/examples.htm A short demo that reports which of three buttons was pressed -- Regards Andy Wiggins www.BygSoftware.com Home of "Save and BackUp", "The Excel Auditor" and "Byg Tools for VBA" "Dr. Schwartz" wrote in message ... I have 16 contol buttons that all launch the same sub. How can I make the code recognise which button was pressed? Is there a way to rename (not the text) a button differently from what Excel assigns? Any help is appriciated Schwartz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I'm sure it must be easy | Excel Discussion (Misc queries) | |||
This should be easy: | Excel Discussion (Misc queries) | |||
This should be easy | Excel Worksheet Functions | |||
Easy one | Excel Worksheet Functions | |||
new user with easy question? not easy for me | New Users to Excel |