如何使用Visual Basic在Internet Explorer中“Tab”和“向下箭头”

时间:2012-06-11 13:39:33

标签: internet-explorer vba internet-explorer-9

有人知道如何模拟Visual Basic中的选项卡和向下箭头按钮吗?我在VB中使用Internet Explorer对象

1 个答案:

答案 0 :(得分:0)

Sendkeys发挥了作用

Dim numberoftabs as Long
Dim numberofdownarrows1 as long

numberoftabs = yourvalue
numberofdownarrows1 = yourvalue

Application.SendKeys "{TAB " & numberoftabs & "}", True
Application.SendKeys "{DOWN " & numberofdownarrows1 & "}", True
Application.SendKeys "~", True