Hello,
I'm stuck in trying to find an ID from a new open Internet Explorer Window.
I know that the ID that I'm trying to search for is "rBeginMonth_BeginDate", but my code always says that it's empty.
The code below is partially of what I've done.
Public WithEvents ie As InternetExplorer
Public WithEvents ieOption_submit As InternetExplorer
Public ieTable As InternetExplorer
Private Sub ie_NewWindow2(ppDisp As Object, Cancel As Boolean)
Set ieOption_submit = New InternetExplorer
Set ppDisp = ieOption_submit.Application
End Sub
Private Sub ieOption_submit_NewWindow2(ppDisp As Object, Cancel As Boolean)
Set ieTable = New InternetExplorer
Set ppDisp = ieTable.Application
End Sub
Sub ixReport_Download()
Set ie = getNewIxReportWindow()
Set frameNavigation = ie.document.frames("List")
Set frameDetail = ie.document.frames("Detail")
'Find and click "Monthly Operational Reports"
strHttp = frameNavigation.document.body.innerHTML
strId_Monthly_Operational_Reports = http_find_image_id_by_content("Monthly Operational Reports", strHttp)
Set imgMonthly_Operational_Reports = frameNavigation.document.getElementById(strId_Monthly_Operational_Reports)
imgMonthly_Operational_Reports.Click
waitready ie
'This is when a NEW IE Window Open after 'Monthly Operation Report' text was click
'From here on, my 'str' and 'Set' are empty with the exception of strHttp.
'I'm assuming that 'strHttp' is still on the 1st IE window, that's why it's not finding the ID that I want to find, i.e "rBeginMonth_BeginDate"
strHttp = frameNavigation.document.body.innerHTML
strId_rBeginMonth_BeginDate = http_find_dropdown_id_by_content("rBeginMonth_BeginDate", strHttp)
Set iptBeginDate = frameNavigation.document.getElementById(strId_rBeginMonth_BeginDate)
strId_rEndMonth_EndDate = http_find_dropdown_id_by_content("rEndMonth_EndDate", strHttp)
Set iptEndDate = frameNavigation.document.getElementById(strId_rEndMonth_EndDate)
Set imgSubmit = frameNavigation.document.getElementById("lgxReport")
Bookmarks