Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use the following code(VBScript) to open 2 urls:
VB
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://www.google.com"
IE.Visible = True

Set IE2 = CreateObject("InternetExplorer.Application")
IE2.Navigate "http://www.youtube.com"
IE2.Visible = True


When I execute the code, then TWO IE windows appear and they navigate to the url as I wanted.

But I don't want 2 WINDOWS. I want 2 Tabs in ONE WINDOW. How to write the code?
Waiting online! Thank you!
Posted

1 solution

Hello

try this

const navOpenInNewTab = &h0800

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://www.google.com"
IE.Visible = True


IE.Navigate "http://www.youtube.com",CLng(navOpenInNewTab)


Pascal PONZONI
 
Share this answer
 
Comments
virusx1984 12-Nov-15 19:01pm    
thank you very much!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900