0

I wanted to use the short cut key in VBA scripting instead of clicking on the objects. So I used this code below ( ^F6 ) to press "ctrl+F6". But it didn't work and displays a syntax error.

SAPGuiSession("Session").SAPGuiWindow("Aufteiler anlegen : Einstieg").SendKey  ^F6

However, +F6 for "SHIFT + F6" worked perfectly. Could anyone figure it out?

kk-dev11
  • 2,654
  • 5
  • 37
  • 48

1 Answers1

0

QTP doesn't translate ^ to control, instead it uses a special constant micCtrl. Something like this might work (untested)

With SAPGuiSession("Session").SAPGuiWindow("Aufteiler anlegen : Einstieg")
    .SendKey micCtrlDown
    .SendKey micF6
    .SendKey micCtrlUp
End With
Motti
  • 110,860
  • 49
  • 189
  • 262