Converting Windows VBA code to MAC ?

stefanoste

New Member
Joined
Dec 2, 2014
Messages
30
I appreciate if someone can advice how to convert the below windows code to work under Mac Machine as well , as it is works perfectly on Windows but not on MAC machine


Code:
 Public Function giveMeValue(ByVal link As Variant) As Variant


        Set htm = CreateObject("htmlFile")


        With CreateObject("msxml2.xmlhttp")
           .Open "GET", link, False
       .send
       htm.body.innerhtml = .responsetext
    End With


    If Not htm.getelementbyId("JS_topStoreCount") Is Nothing Then


       giveMeValue = htm.getelementbyId("JS_topStoreCount").innerText


    Else
        giveMeValue = "0"


    End If


    htm.Close
    Set htm = Nothing


    End Function
to retrive the value I use =GiveMeValue(A1) ,

THX
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Watch MrExcel Video

Forum statistics

Threads
1,099,113
Messages
5,466,756
Members
406,497
Latest member
Bryanlim

This Week's Hot Topics

Top