how to double click web object in VBA

有些话、适合烂在心里 提交于 2019-12-23 04:22:25

问题


I am automating a web process with VBA. I go find an object on a webpage using

IE.document.getelementsbytagname

etc.. Once that object is found, you can single click using

 objElement.click

The question is, how do I double click?? All my searches have come up with nothing. I thought dblClick or doubleClick would do the trick, but those are invalid methods. I tried a workaround by using

objElement.click
sendkeys "{ENTER}"

to click and then hitting enter would open the link, but that doesn't work either.


回答1:


I finally got this working:

objElement.click
objElement.FireEvent "ondblclick", 1, 2


来源:https://stackoverflow.com/questions/25855904/how-to-double-click-web-object-in-vba

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!