1

Here is an issue regarding VBA.

I've scoured my books and searched the web for the answer on this piece of code

Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")

so I've tried countless times to search Google with: WinHttp Object VBA and here some links I visited numbered for you ease

search and visited links

On number 1 I saw that is called WinHttp reference as you can see that on the red ink on the picture and also that is does not mention VBA as a language on help seen in the blue ink

site visited

On number 2 there are no information regarding the WinHttp component it has there the WinHttpRequest Object check red ink please.

enter image description here

I have tried to find it explicitly as WinHttpRequest.5.1 what is the difference? I have tried to find it as 5.1 but to no avail. Also I was very disheartened to find that if I enter the Object browser in VBE and I search WinHttp I find out the WinHttpRequest there as a property!

enter image description here

Also do do I have to activate a relevant library from tools references?

It's no secret that I want to pull XML data for financial modeling and I must understand such concepts I've searched other answers and they ask on more advance issues.

Finally can you point me towards a material that writes about VBA-XML interaction a little noob-friendly please.

Thanks for watching my question

Teamothy
  • 2,000
  • 3
  • 16
  • 26
ExoticBirdsMerchant
  • 1,466
  • 8
  • 28
  • 53
  • 1
    See [this Q+A](http://stackoverflow.com/q/158633/1490783), maybe it will help. – Olle Sjögren Jan 30 '14 at 12:41
  • i'm sorry i tried but all i understand is that VBA somehow controls the an HTTP Request and it utilizes the WinHttp.WinHttpRequest.5.1 maybe if you provided me with a brief explanation of this code snipet Set WinHttpReq = CreateObject(WinHttp.WinHttpRequest.5.1 i could understand the rest of the Q+A you have given to me. As you can see in my post i have searched for WinHttp and WinHttpRequest and i have found so many different explanations..where can i found a concrete full description of these code components? – ExoticBirdsMerchant Jan 30 '14 at 13:01
  • 1
    If you do not understand the fundamental `CreateObject` method, you are already in over your head. This simply creates an instance of an object class ("WinHttp.WinHttpRequest.5.1") which assigns it to an object variable: `WinHttpReq`. You can then use this object variable to control an HTTP request. – David Zemens Jan 30 '14 at 17:40
  • 1
    You may want to enable this library reference: http://imgur.com/ezpQHnj – David Zemens Jan 30 '14 at 17:44
  • Wow back just a question guys... well why is the object created as WinHttpRequest.5.1 when i can only find it as WinHttpRequest alone is there a web source that explains the 5.1? – ExoticBirdsMerchant Jan 30 '14 at 17:45
  • My question may sound dumb but believe me i scoured the web for it and i find it as this one http://msdn.microsoft.com/en-us/library/windows/desktop/aa384106(v=vs.85).aspx with a 5.1 – ExoticBirdsMerchant Jan 30 '14 at 17:47
  • 1
    5.1 is the latest version, so assume that the reference material applies and any breaking changes from previous versions will be noted as needed. Here is some info on the version differences: WinHttp Versions, http://msdn.microsoft.com/en-us/library/windows/desktop/aa384276(v=vs.85).aspx, What's New in 5.1, http://msdn.microsoft.com/en-us/library/windows/desktop/aa384086(v=vs.85).aspx – Tim Hall Feb 22 '14 at 01:22

0 Answers0