Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2010 Would like to avoid late binding

$
0
0
Does anyone know how to declare the "oHTML" object in the following code so the I won't have to use late binding?

Dim oHTML

strURL = "http://finance.yahoo.com/q/bc?s=ABT+Basic+Chart"
Dim s As String = RequestWebData(strURL, strSymbol)
oHTML = CreateObject("htmlfile") 'late binding
oHTML.Open()
oHTML.Write(s)
oHTML.Close()

This code is part of a web scraping project.

Since the oHTML object is late-bound the OPTION STRICT ON compiler directive complains and Intellisense features are not available. Intellisense would be especially nice when working with the Document Object Model (e.g., "oHTML.all.tags("TABLES").rows(0).cells(0).innerText").

I've poked around VBForums and other VB.Net websites, but haven't found anything to help.

Appreciate any advice on this question.

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>