Share via

Word After activating the enter key move cursor to the next icon in the ribbon using VBA

SteveD 435 Reputation points
2026-04-17T19:36:19.4033333+00:00

Hello from Steve

I do not know if this is possible.

I have two icons in the ribbon side by side.

After activating the enter key move cursor to the next icon in the ribbon using VBA

Microsoft 365 and Office | Word | For home | Windows

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-17T19:36:29.6433333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Word does not expose any VBA object model to move the keyboard focus between ribbon controls or to “select the next icon” on the ribbon after pressing Enter. Ribbon controls can run macros when clicked or activated, but VBA cannot programmatically shift focus from one ribbon button to another.

    What can be done instead is:

    1. Use keyboard navigation that Word already provides for the ribbon:
      • Press Alt or F10 to activate the ribbon and show KeyTips.
      • Use Left/Right Arrow to move between tabs and Ctrl+Left/Right Arrow to move between groups.
      • Use Tab/Shift+Tab or the Arrow keys to move between commands on the ribbon.
      • Press Spacebar or Enter to activate the selected command.
      These behaviors are built-in and not controllable via VBA.
    2. If the goal is to run two commands/macros in sequence, combine the logic into a single macro and assign that macro to one ribbon button, instead of trying to move focus to the next button.

    Because the ribbon is not programmable at the focus/selection level through VBA, automatically moving the cursor to the next ribbon icon after Enter is not possible.


    References:

    Was this answer helpful?

    1 person found this answer helpful.