I need to get some data from website. I use System.Net.Client.DownloadData in Powershell script and works fine. Now I need to use it in Excel VBA macro but not working as below. any suggestion? Thanks
Dim oWebClient As New WebClient
sURL = "http://ichart.finance.yahoo.com/table.csv?s=GIL.TO&d=0&e=9&f=2014&g=d&a=0&b=7&c=2014&ignore=.csv"
oData = oWebClient.DownloadData(sURL)
sRec = Encoding.ASCII.GetString(oData)