Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 3 of 3
  1. #1
    ktwdallas is offline Registered User
    Join Date
    Nov 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mac Excel VBA Programming

    I'm trying to find a Mac equiv. to a problem I have now that I've migrated from Windows. I have some Excel spreadsheets that contain a macro (posted below) that downloads a web page via HTTP. It's using built-in Windows sockets to do that, and the rest of the macro parses out stuff in the spreadsheet.

    Now that I'm the Mac, the macro doesn't work because it's expecting technology that isn't there. TCP/IP is integrated into the Mac that there's got to be some way to tap into that from Excel VBA so I can rewrite this macro, but after searching for hours on the 'net, I'm very frustrated. Can anyone point me to a sample code snippit or any help on how to convert this to work in OS X?

    Kris

    EpisodeGuidePath = "http://epguides.com/OliverBeene/"
    Set http = CreateObject("msxml2.xmlhttp")
    sURL = EpisodeGuidePath
    http.Open "GET", sURL, False
    http.send
    sHtml = http.responsetext
    Set stream = CreateObject("adodb.stream")
    stream.Type = 1 'binary
    stream.Open
    stream.write http.responseBody
    stream.savetofile "epguide.txt", 2 'create/overwrite
    stream.Close

  2. #2
    chornbe is offline Who, me?
    Join Date
    Feb 2005
    Location
    Near to Philly.
    Posts
    382
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would shell and use curl or wget

  3. #3
    ktwdallas is offline Registered User
    Join Date
    Nov 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do you have sample code on how you would do that from inside Excel?

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •