[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1238
  • Last Modified:

Create underline shortcuts for ALT + Letter keys in VBA

Hi guys,

In VB you are able to add the "&" symbol before a letter to enable the ALT + Letter combination.
Are you able to do this in VBA? If so, how?

For example, I have an Option button with the label "Choose me": using "&Choose me" works in VB, it underlines the "C" and allows you to press the ALT+C buttons to select it. I can't get this to work in VBA, I'm looking for a way to do this.
I'm writing this in Outlooks built in VBA editor.

Thanks.
0
gamm
Asked:
gamm
1 Solution
 
David LeeCommented:
Hi, gamm.

Look for the Accelerator property.  I don't remember off-hand which controls have that property, but it's what you're looking for.  One note though, it doesn't underline the accelerator key.  The user has to know that ALT+Accelerator is the shortcut.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now