Rizwan Ahmed
New Member
Dear,
My name is Rizwan Ahmed, I am using microsoft excel 2007. I have problem with VBA Scripting.
I want to search the element in webpage using tagname and classname and extract the inner text and display the message on msgbox.
This is a code when i typed number in cell field then required webpage will be open in internet explorer.
But my issue is that when webpage open, next i want i search the text using tagename and classname by inspecting element on webpage and extract the innertext and display on the message box.
Here is the code
	
	
	
		
Regards
				
			My name is Rizwan Ahmed, I am using microsoft excel 2007. I have problem with VBA Scripting.
I want to search the element in webpage using tagname and classname and extract the inner text and display the message on msgbox.
This is a code when i typed number in cell field then required webpage will be open in internet explorer.
But my issue is that when webpage open, next i want i search the text using tagename and classname by inspecting element on webpage and extract the innertext and display on the message box.
Here is the code
		Code:
	
	Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = Range("number").Row And _
Target.Column = Range("number").Column Then
  Dim IE As New InternetExplorer
  IE.Visible = True
  IE.navigate "i.e any webpage link" & Range("number").Value
  Do
  DoEvents
  Loop Until IE.readyState = READYSTATE_COMPLETE
  Dim Doc As HTMLDocument
  Set Doc = IE.document  
  End If
End SubRegards
			
				Last edited by a moderator: 
			
		
	
								
								
									
	
								
							
							