I want to fetch a specific data from the webpage and get it pasted in B column of the excel sheet.
My source code is given below:
<span id = "LblAgentID_O"/Span>
If this code not found in the webpage then need to update in excel sheet as source not found.
To this macro it needs to get added.
Sub GetIE()
' This code is to get list of all open IE windows and there URLs
Dim sh As Object, oWin As Object, IE As Object
Set Shell = CreateObject("WScript.Shell")
Set sh = CreateObject("Shell.Application")
For Each oWin In sh.Windows
If TypeName(oWin.document) = "HTMLDocument" Then
Set IE = oWin
Exit For
End If
Next
MylastRow = Cells(Row.count,"A"). End(xlUp).Row
For I = 2 To MylastRow
If Sheet1.Cells(I, 1) <> "" Then ' Checking for non blank row