Skip to content Skip to sidebar Skip to footer

Loop Through Div Elements Using Vba

I'm having an issue with looping through div elements, well I dont know how to do it. The code is pretty much working. Essentially I have access to a website and would like to dow

Solution 1:

This work with me.

Dim divs As Object
Dim div As Object

// get all div element in DOM
Set divs = IE.document.getElementsByTagName("div")

// loop through all div elements
For Each div In divs
    // do things here
    // e.g. div.innerHTML = "hello"
Next div

Post a Comment for "Loop Through Div Elements Using Vba"