我一直在尝试从 Excel 宏自动反射,代码如下。但是,有 2 个会话打开,我附上了相同的屏幕截图以供参考。谁能帮助我如何在已经运行的会话之间切换。
Public objFM As Object
Set objFM = GetObject("RIBM") With objFM
.WaitForEvent rcEnterPos, "30", "0", 4, 41
.WaitForDisplayString "code:", "30", 4, 34
.TransmitTerminalKey rcIBMResetKey
.TransmitANSI "MTAE"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End With