![]() |
#1
|
|||
|
|||
![]()
Hi everybody,
First off, great group here everyone is always so willing to help out and give their knowledge. I dont exactly have a problem just more a question. I know that you can set references in Excel VBA in order to get the intellisense to come up. This can be done with browser documents and other things as well, the topic I am pointing at today is the InternetExplorer DOM. I have it to where I can get intellisense with the following code. Code:
Sub TestBrowserCode() Dim ie As New InternetExplorer Dim url as String, v as Variant Dim CheckRow as Integer ie.Visible = True For CheckRow = 2 to 100 url = range("A" & CheckRow).value ie.navigate url do while ie.ReadyState <> 4: DoEvents: Loop For Each v in ie.document.GetElementsByTagName("a") 'no intellisense Is this just the way Excel VBA is or am I missing something to get intellisense to come up? I have already set the following references Microsoft Internet Controls Microsoft WinHTTP Services version 5.1 Microsoft HTML Object library (I really thought this one would do it.) Like I said I really thought that last reference would make it work but no luck. If anybody has any information on this I would really appreciate it. Thanks |
#2
|
|||
|
|||
![]()
Well I do not give up very easily and found out how to get the intellisense.
I need to declare a variable as an HTMLDocument I have the code below in case anyone comes by this thread and wanted the solution. Code:
Sub IntellisenseExper() Dim HTDoc As HTMLDocument Dim ie As New InternetExplorer ie.Visible = True ie.Navigate ("http://www.yahoo.com") Set HTDoc = ie.Document HTDoc.getElementsByClassName End Sub |
#3
|
||||
|
||||
![]()
Good job mate. Thanks for sharing your learning.
![]() |
![]() |
|