Excel MAC and WinHttpRequest or Msxml2.ServerXMLHTTP

jcorlando

New Member
Joined
May 23, 2010
Messages
23
Hi All,

My client is using Excel on a MAC
and I need to send an HTTP GET command via VBA.

The code fails using: Msxml2.ServerXMLHTTP

Then error messages says missing references:
- Microsoft HTML Object Library
- Microsoft Internet Controls
- Microsoft WinHTTP Services, version 5.1.

Questions:
1) How can I add these missing libraries?
I can't seem to find them like I can in a Windows.
2) Any thoughts on a cross platform system?


Thanks,

John,
In Annapolis, MD
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
-- Bump --

Anyone familiar with VBA in Excel MAC



A potential alternative to avoid having to select the library is to use an object i.e.


<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; ">Sub http()Dim MyRequest As Object

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

MyRequest.Open "GET", _ "http://www.google.com"


' Send Request.

MyRequest.Send

'And we get this response

MsgBox MyRequest.ResponseText

End
Sub


This worked for me,Sending http requests with VBA from Word - Stack Overflow
</code>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,452
Messages
6,124,916
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top