Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Identify the button clicked on a calc worksheet

Given a calc sheet with several buttons that execute the same macro when clicked, is it possible for the macro to determine which button was clicked? Maybe by accessing the button properties to read the button name or additional information property. Note that the buttons are not in a dialog, but are defined on a sheet.

Of course it is possible for each button to execute a unique macro that calls a common subroutine. Being able to identify the button would allow simpler code when there are many buttons.

My current release is 6.0.6, but I could upgrade to a more recent release if necessary. My OS is Linux Mint 18.3.