open web page , right click and open Link in new tab

Sanjay Vyas
Sanjay Vyas used Ask the Experts™
on
Hi, I just wanted to open a web page , right click one link given on that web page and open it in new tab. Is there any way in Excel vba to do the same?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
In theory yes. You need a WebBrowser control for that, which is effectively an Internet Explorer. And some research of the site code to find the correct "handle" (tag, ID, class) to identify exactly that link. As soon as you have that "object", you can trigger a Click() action. But you cannot change whether the click leads to a new window, tab or just stays within the same tab.

To emphasize:: The code used depends on the site it accesses. There is no generic code.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial