Ribbon Custom Tab Focus

D

Dovy

I am trying to set focus on one of a number of custom tabs.
I use the Keytip technique:
1. In XML - Define a Keytip
2. In VBA - Application.SendKeys "%ZYX{RETURN}"
It works, however I also get a Beep, indicating some error.
What could be the problem?
 
H

Homey

Might not need {return} see if work without

|I am trying to set focus on one of a number of custom tabs.
| I use the Keytip technique:
| 1. In XML - Define a Keytip
| 2. In VBA - Application.SendKeys "%ZYX{RETURN}"
| It works, however I also get a Beep, indicating some error.
| What could be the problem?
 
D

Dovy

Might not need {return} see if work without


|I am trying to set focus on one of a number of custom tabs.
| I use the Keytip technique:
| 1.  In XML - Define a Keytip
| 2.  In VBA - Application.SendKeys "%ZYX{RETURN}"
| It works, however I also get a Beep, indicating some error.
| What could be the problem?

{Return} is necessary to get the focus away from the ribbon.
I took me some time, but I found the problem.
When you try to change focus with SendKeys technique, the tab get
selected as soon as Excel detects a unique value. Since there is no
other tab with keytip starting with Z, excel fired the selection when
Z was sent, then complained with a beep when YX were sent. Manual
operation using ALT+ works just fine with all three characters.
Dovy
 
Top