Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-04-2015, 11:08 PM
excelledsoftware excelledsoftware is offline GetElementsByTagName Intellisense Windows 7 64bit GetElementsByTagName Intellisense Office 2003
IT Specialist
GetElementsByTagName Intellisense
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default GetElementsByTagName Intellisense

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
Now the problem is not that I dont know what to do to get the needed data where I stopped the annoyance is that there seems to never be any intellisense after ie.document

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
Reply With Quote
  #2  
Old 01-19-2015, 12:20 AM
excelledsoftware excelledsoftware is offline GetElementsByTagName Intellisense Windows 7 64bit GetElementsByTagName Intellisense Office 2003
IT Specialist
GetElementsByTagName Intellisense
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

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
Thanks to all that checkout this thread I'm glad I was able to find the answer.
Reply With Quote
  #3  
Old 01-21-2015, 03:26 AM
CoolBlue's Avatar
CoolBlue CoolBlue is offline GetElementsByTagName Intellisense Windows 7 64bit GetElementsByTagName Intellisense Office 2013
Advanced Beginner
 
Join Date: Jun 2014
Location: Australia
Posts: 40
CoolBlue is on a distinguished road
Default

Good job mate. Thanks for sharing your learning.
Reply With Quote
Reply

Thread Tools
Display Modes


Other Forums: Access Forums

All times are GMT -7. The time now is 06:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft