none
give specific internet information in a msgbox RRS feed

  • Question

  • i wrote a translation program using interglot.com but now the program only opens the internet page (shell function) and inserts the write keyword (the url is easy to understand, so it just gives in the write url), so you need to take a look to that page before you can continu. i want that the program gives the translation in a msgbox. but i have no idea how... hopefully you do!
    • Edited by Mr. Rik Saturday, May 4, 2013 5:49 PM
    Saturday, May 4, 2013 4:45 PM

All replies

  • Hi

    You can try automating it with

    Microsoft Internet Controls

    (or)

    QueryTable

    Please try connecting your website from Excel using webquery and if it works, you can go for Query table

    Cheers

    Shasur


    http://www.vbadud.blogspot.com http://www.dotnetdud.blogspot.com

    Sunday, May 5, 2013 7:27 AM
  • could you give an example? (i don't know this functions)
    Sunday, May 5, 2013 8:04 AM
  • You can use XMLPhaser:

    Private Function WebExists(strona$) As String
    Dim objHttp As Object
    
    On Error GoTo blad:
    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
     With objHttp
        .Open "GET", strona, False
        .Send
        WebExists = .responsetext
     End With
    blad:
    If Err > 0 Then WebExists = ""
    Set objHttp = Nothing
    End Function
    
    sub test()
    msgbox WebExists("www.yourpage.com")
    end sub

    or WebQuery

    Sub Take_data_from_web_page()
    Dim strona$: strona = "http://www.your_page.com"
    Dim wks As Worksheet: Set wks = Worksheets.Add
        With wks.QueryTables.Add(Connection:= _
            "URL;" & strona, Destination:=wks.Range("$A$1"))
            .Name = "PageName"
            .FieldNames = True
            .PreserveFormatting = True
            .BackgroundQuery = True
            .RefreshStyle = xlInsertDeleteCells
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .WebSelectionType = xlEntirePage
            .WebFormatting = xlWebFormattingNone
            .WebPreFormattedTextToColumns = True
            .WebConsecutiveDelimitersAsOne = True
            .Refresh BackgroundQuery:=False
        End With
        MsgBox "In new Sheet"
    End Sub


    Oskar Shon, Office System MVP

    Press if Helpful; Answer when a problem solved

    Monday, May 6, 2013 9:51 AM
    Answerer
  • i would like to work with the querytables if this are the only options that i have...

    but i need to work from word, and i only need the 26th aspect of the querytable that appears, so i was wondering if there was an easier way to do it, and if that is impossible, then how to summon the excel program from the word document and give the information that i need in the word document


    • Edited by Mr. Rik Monday, May 6, 2013 4:45 PM
    Monday, May 6, 2013 4:44 PM