Hello,
I'm currently trying to get a specific element ID that changes when the array re-orders itself depending on the page. I'm trying to search for the hidden value and then grab that hidden ID or Name (either works). Any help / guidance you can give would be much appreciated! I just need to be able to reference the value to pull the ID or Name and then I'll be good to go. Thanks again!
The HTML I'm working with:
Here's some of the stuff that has got me close but has not completely worked:
I'm currently trying to get a specific element ID that changes when the array re-orders itself depending on the page. I'm trying to search for the hidden value and then grab that hidden ID or Name (either works). Any help / guidance you can give would be much appreciated! I just need to be able to reference the value to pull the ID or Name and then I'll be good to go. Thanks again!
The HTML I'm working with:
<div class="row">
<div class="col-md-5">
<input type="hidden" name="MyNumber[25].ID" id="MyNumber[25].ID" value="60">
Here's some of the stuff that has got me close but has not completely worked:
Sub TextToRight()
Dim ie As InternetExplorer
Dim txt
Dim ToFind As String
Set ie = New InternetExplorerMedium
ie.navigate "https://NonPublicSite.com
' Make IE browser visible (False would allow IE to run in the background)
ie.Visible = True
'####Loop until fully loaded####
Do Until ie.readyState = READYSTATE_COMPLETE
Loop
####This one worked but its the opposite of what I need. I need to search for the Attribute with the value of "60" and return the Element. This one however searched for the ID and returned the value.
test = ie.document.getElementById("MyNumber[25].ID").getAttribute("value")
Worksheets("sheet1").Range("A2").Value = test
####Failed
test = ie.document.getAttribute("60").getAttribute("value")
Worksheets("sheet1").Range("A2").Value = test
####Failed
test = ie.document.getAttribute("60").getElementById()
Worksheets("sheet1").Range("A2").Value = test
ie.Quit
Set ie = Nothing
End Sub