I have a tool I am preparing for a friend as he now has an age related issue of tremor filled hands. It is a budget tool. Instead of having a listbox with the months of the year in it, which he cannot properly click on the correct month because the default font is too small and his hand shakes too much, I inserted 12 equally sized rounded, huge rectangular shapes with the months of the year on them.
I then renamed each button with the month name it represents. Why? I want one procedure to get the shape/button that was clicked and get me its name. As such I can then feed the correct budget to show for my friend. The code once I have the shape's name is easy. Getting the shape's name is not (at least for me).
As an aside, I did search for this issue on your site and came up with this code (provided by one of your specialists):
MsgBox ActiveSheet.Buttons(Application.Caller).Caption
But it gives me the runtime error of 1004 and says:
Unable to get the Buttons property of the Worksheet class
Since I am using a shape, I tried:
MsgBox ActiveSheet.Shapes(Application.Caller).Caption
and then I get another error with:
'-2147352571 (80020005)'
The item with the specified name wasn't found
Can anyone help me?
Thanks
I then renamed each button with the month name it represents. Why? I want one procedure to get the shape/button that was clicked and get me its name. As such I can then feed the correct budget to show for my friend. The code once I have the shape's name is easy. Getting the shape's name is not (at least for me).
As an aside, I did search for this issue on your site and came up with this code (provided by one of your specialists):
MsgBox ActiveSheet.Buttons(Application.Caller).Caption
But it gives me the runtime error of 1004 and says:
Unable to get the Buttons property of the Worksheet class
Since I am using a shape, I tried:
MsgBox ActiveSheet.Shapes(Application.Caller).Caption
and then I get another error with:
'-2147352571 (80020005)'
The item with the specified name wasn't found
Can anyone help me?
Thanks