12-12-2009, 10:16 AM
Hi Tarun,
Check with the below codes, both are working fine as you expected
Note: I am using IE 6.
Code 1:
Code 2:
Hope this would solve your issues
Check with the below codes, both are working fine as you expected
Note: I am using IE 6.
Code 1:
Code:
Dim IE
Set IE=createObject("internetExplorer.application")
IE.visible=true
hwndMain=IE.HWND
msgbox hwndMain
Window("hwnd:="& hwndMain).Maximize
IE.Navigate "about:blank"
urlToNavigate="www.gmail.com"
Browser("hwnd:="& hwndMain).Navigate urlToNavigate
Set IE=Nothing
Code 2:
Code:
Dim IE,IE1
Set IE=createObject("internetExplorer.application")
IE.visible=true
hwndMain=IE.HWND
msgbox hwndMain
Window("hwnd:="&hwndMain).Maximize
IE.Navigate "about:blank"
IE.Navigate "www.google.com"
Set IE1=createObject("internetExplorer.application")
IE1.visible=true
hwndMain1=IE1.HWND
msgbox hwndMain1
IE1.Navigate "www.gmail.com"
Set bDesc = Description.Create()
bDesc("application version").Value = "internet explorer 6"
Set bColl = DeskTop.ChildObjects(bDesc)
Cnt = bColl.Count
MsgBox "There are total: "&Cnt&"browsers opened"
For i = 0 To (Cnt -1)
MsgBox "Browser : "&i+1&" has title: "& bColl(i).GetROProperty("title")
Next
Set bColl = Nothing
Set bDesc = Nothing
Set IE = Nothing
Set IE1 = Nothing
Hope this would solve your issues