vba - MainFrame 应用程序中的 PageDown 键

标签 vba excel

我想登录并导航到另一个大型机页面。
我需要一个接一个地打开三个屏幕。打开第一个屏幕后,应返回主菜单,快捷键为“PageDOWN”。
在 VBA 中使用 SendKeys。

CreateObject("WScript.Shell").Run("")
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System")    
If (System Is Nothing) Then
    MsgBox "Could not create the EXTRA System object.  Stopping macro playback."
    Stop
End If
Set Sessions = System.Sessions
            
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
Sess0.screen.putstring "pppx" 18, 35
Sess0.screen.SendKeys ("<Enter>")

Sess0.screen.putstring MainLoginID, 14, 17
Sess0.screen.putstring MainLoginPwd, 15, 17
Sess0.screen.SendKeys ("<Enter>")

If activescreen = "FOOD SYSTEMS" Then
    Sess0.screen.SendKeys ("<HOME>")
    Sess0.screen.putstring "21", 23, 7
    Sess0.screen.SendKeys ("<Enter>")
END IF
Sess0.screen.SendKeys "{PGDN}"

Sess0.screen.SendKeys "{PGDN}"  
Sess0.screen.SendKeys ("{PGDN}")
Sess0.screen.SendKeys ("<PGDN>")
除了向下翻页,一切都在工作。
Sess0.screen.SendKeys ("<HOME>")
Sess0.screen.SendKeys ("<F7>")
有类似的帖子,但没有找到我的问题的解决方案 Sendkeys Page Down not working .

最佳答案

也许有人还在寻找答案

SendKeys "<PA2>"
这对我有用。

关于vba - MainFrame 应用程序中的 PageDown 键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43061830/

相关文章:

vba - 用于合并 Excel 中其他列中的信息匹配的行的单元格的宏

vba - 使用vba删除范围内的删除线单元格

excel - 复制工作表时获取新工作簿

c++ - 如何在 MS Visual C++ 中使用 Excel

excel - 如何编写公式以更改同一单元格中的多个字母

Excel VBA : Why "Sheets" collection is not a "Collection"?

sql - 记录集类型不匹配问题

excel - 禁用按钮,直到按下另一个按钮,如果单元格值更改,则再次禁用它

excel - 从文件夹中的所有文件复制数据

excel - 在 Excel 中设置程序以供热键使用