[Solved] (GetElement)Clicking a button with no ID, TAG, NAME, CLASS, VALUE, SIBLINGS


OP here. Sorry for the terrible formatting of the question, it was the first time. To help others in the future…..

This is what I did at first. It was my band aid fix.

ie.document.getelementByID("filtervalue").select
"SendKeys{ENTER}"

This highlighted my input value and just pressed enter. If you are new to VBA and need something to be immediately functional, just use .select and SendKeys and come back to it later.

then, 1 week later, I figured out

Call ie.document.parentWindow.execScript("setUserIDAndRunDataspy();", "JavaScript")

This, on the other hand just literally runs the event itself and is more reliable.
In case you run into any issues, the first iterations I tried were something like

Call ie.parentWindow.execScript("setUserIDAndRunDataspy();", "JavaScript")
Call ie.document.execScript("setUserIDAndRunDataspy();", "JavaScript")

They didn’t work for me, but worked for other scripts i checked. I’m not sure why though.

Another solution you could try to though I haven’t tested it is what Tim Williams suggested. It would go something like this:

For Each ele In ie.document.getelementsbytagname("img")
              If InStr(ele.Value, "./images/dsprun_out.gif") > 0 Then ele.Click
Next

solved (GetElement)Clicking a button with no ID, TAG, NAME, CLASS, VALUE, SIBLINGS