PDA

View Full Version : CommandButton Accelerator Key not working



jburritt01
12-23-2018, 03:47 PM
So I have a CommandButton with the Accelerator set to C. The caption contains a C in it, so it underlines it, indicating that's the Accelerator key. However, when I present, I can't use the Accelerator key. I've tried C, Alt + C, Alt + Shift + C, etc, but none of them work. I also can't use it when I'm in any other mode (editing the slide show for example). The only time I've gotten it to work is when I have a CommandButton in a UserForm, said UserForm is open, and I press Alt + C. Any help would be appreciated.

For reference, the code attached to the CommandButton is as follows:




Private Sub CommandButton1_Click()


CommandButton1.Accelerator = "C"


MsgBox 89


End Sub

John Wilson
12-24-2018, 02:42 AM
Many methods of ActivX object ONLY work on userforms. This is one of them.