SendKeys() permission denied error in Visual Basic

后端 未结 9 1612
逝去的感伤
逝去的感伤 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:39

    You can use this code in Module

    Public Sub SendKeyTab(CForm As Form)
    On Error Resume Next
    Dim G As Single
    For G = 0 To CForm .Controls.Count - 1
        If CForm .Controls(G).TabIndex = CForm .ActiveControl.TabIndex + 1 Then CForm .Controls(G).SetFocus
    Next
    End Sub
    

    On Each Form Level

    If KeyCode
    

提交回复
热议问题