Rhett
11-18-2012, 04:21 PM
Hi, I am having trouble accessing the information in the "menu 2" part of my code below. If I add a watch to IE.document.getelementbyid("menu2").all I can see that this object contains the following:
+constructor
ie8_length
length
+Item 1
+Item 2
+Item 3
+Item 4
+Item 5
+Item 6
If I click on Item 6, the list expands and there is an item called ie8_href that contains a url I would like to access. However, the method I am trying to access this data (shown below as notes in the code) gives me an "Object doesnt support this property or method" error. Can anyone please help me out? I have been struggling with this way too long.:banghead:
Sub Test()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate ("MyWebsite")
While IE.Busy Or IE.readyState <> 4: DoEvents: Wend
IE.document.getelementbyid ("menu2")
'IE.document.getelementbyid("menu2").all("Item 6").href
While IE.Busy Or IE.readyState <> 4: DoEvents: Wend
Debug.Print IE.LocationURL
End Sub
+constructor
ie8_length
length
+Item 1
+Item 2
+Item 3
+Item 4
+Item 5
+Item 6
If I click on Item 6, the list expands and there is an item called ie8_href that contains a url I would like to access. However, the method I am trying to access this data (shown below as notes in the code) gives me an "Object doesnt support this property or method" error. Can anyone please help me out? I have been struggling with this way too long.:banghead:
Sub Test()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate ("MyWebsite")
While IE.Busy Or IE.readyState <> 4: DoEvents: Wend
IE.document.getelementbyid ("menu2")
'IE.document.getelementbyid("menu2").all("Item 6").href
While IE.Busy Or IE.readyState <> 4: DoEvents: Wend
Debug.Print IE.LocationURL
End Sub