I have a userform in my macro. I replaced the ActiveX buttons with a label. Each ActiveX button had an accelerator key and they all worked like as expected. Once I changed the ActiveX buttons to labels, the accelerator keys no longer worked with the labels. I'm not sure. I'd appreciate any suggestions to get the accelerator keys working again. Thanks for the help
The behavior of the Accelerator property of a Label control is to set the focus to the next control in the tab order. The behavior of the Accelerator of a commandbutton is to call its Click event. You can't call a Label's click event, or any other event, from an accelerator key.
If you want to use labels, you could put textboxes after the labels and put whatever code you want in the Textbox_Enter event. I created two labels and two textboxes. I made the Height and Width of each textbox 1, so they are almost invisible. When the accelerator for the label was pressed, the focus went to the textbox and the Enter even fired.
Private Sub TextBox1_Enter()
'do the thing the button would do
End Sub
A bit of a hack and a little extra set up, but it works.