SendKeys() permission denied error in Visual Basic

后端 未结 9 1562
逝去的感伤
逝去的感伤 2021-01-11 11:14

I am trying to use the SendKeys() command to another window with my VB6 app.

What I wanted is to click a button, and then have 10 seconds to go to the o

9条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-11 11:47

    Replacement for VB6 SendKeys is WScript.Shell SendKeys, like this:

    Set WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys "1{+}"
    

    See MSDN for help.

提交回复
热议问题