Hi all,
I am kind of stuck. I made a code which basically does some data pulling from html code from a web page. All code works fine, but I am using 2 instances of internet explorer to get to my data.
The pages I go to for getting my info, run a script that opens a new tab within the same browser window. But my IE1 and IE2 only contain the first tabs of both IE windows. This means, if I quit them the extra tab stays open. How can I expand IE1 and IE2 to cover all the tabs that are in the IE window, so I can close them both?
I am kind of stuck. I made a code which basically does some data pulling from html code from a web page. All code works fine, but I am using 2 instances of internet explorer to get to my data.
Code:
Dim ieMain As InternetExplorer
Dim ie1 As InternetExplorerMedium
Dim ie2 As InternetExplorerMedium
Dim html1 As HTMLDocument
Dim html2 As HTMLDocument
Dim objSelectCollection As Object
Dim objTableCollection As Object
Dim objInputCollection As Object
Dim objCollectionBanner As Object
Dim objCollection As Object
Dim objElement As Object
Dim objLoginButton As Object
Dim objSearchButton As Object
Dim objClearButton As Object
Dim MachineTypeFound As Boolean
Dim loginScreen As Boolean
Dim sBanner As String
Dim i, J As Long
Dim sequenceLink As String
Dim MachineTypeHomeSheet As String
Dim rowsMI, rowsSI As Integer
Dim columnsMI, columnsSI As Integer
ErrorDuringImport = False
loginScreen = False
Set ie1 = New InternetExplorerMedium
Set ie2 = New InternetExplorerMedium
ie1.Visible = True
ie2.Visible = True
ie1.Navigate "https://****.com"
ie2.Navigate "https://****.com"
## bunch of code to grab what I need
'Code which does not work because because there are extra tabs
'ie1.quit
''ie2.quit
'Code which does not really work because I am trying to delete multiple entries and the shell shifts
'Dim Shell As Object
' Dim IE As Object
'
' Set Shell = CreateObject("Shell.Application")
'
' For Each IE In Shell.Windows
' If TypeName(IE.Document) = "HTMLDocument" Then
' IE.Quit
' End If
' Next
The pages I go to for getting my info, run a script that opens a new tab within the same browser window. But my IE1 and IE2 only contain the first tabs of both IE windows. This means, if I quit them the extra tab stays open. How can I expand IE1 and IE2 to cover all the tabs that are in the IE window, so I can close them both?