Consulting

Results 1 to 2 of 2

Thread: CommandButton Accelerator Key not working

  1. #1

    CommandButton Accelerator Key not working

    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

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Many methods of ActivX object ONLY work on userforms. This is one of them.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •