Results 1 to 13 of 13
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    macro no get data from web.... (2000)

    Attached is my project to get data from web... and insert in sheet.
    But the code non get correct data...??????

    After .submit i want to get the related data and insert in sheet.
    The name of field is the same in sheet title.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: macro no get data from web.... (2000)

    The table you want to look at is not Item(1) but Item(3). So replace all instances of Item(1) with Item(3)

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro no get data from web.... (2000)

    great!
    tKS.
    Little suggestion...

    Instead to go to the line .navigate "https://www.bancaroma.it/site/labanca/abi.asp" to go to the default page, exitsis a staement commend in .IE object to have the same effect to use the button "back" of browser?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: macro no get data from web.... (2000)

    Yes, use its .GoBack method.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro no get data from web.... (2000)

    sorry but no effect with .goback...

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: macro no get data from web.... (2000)

    You'll have to navigate to the main page before starting the loop, then submit the values from column A and B at the start of the loop, and use .GoBack immediately above the line Next lngRow.

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro no get data from web.... (2000)

    <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> <img src=/S/artist.gif border=0 alt=artist width=34 height=29> ... sorry i'm stupid, now all work ok!

  8. #8
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro no get data from web.... (2000)

    Hans, really have big prob with this page!? (posted in IE)
    I want to arrange the code attached to insert value in textbox from column A and press CERCA...How to.
    to get data is the next step:-)
    Tks.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: macro no get data from web.... (2000)

    I have no idea, sorry.

  10. #10
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro no get data from web.... (2000)

    Hans only a little help...
    Attached have a macro to get data from web and it work fine.
    Now i want arrange this code to use with the page zipped in this post: 675,549.
    question:
    1)
    instead to use With .document.Forms(1)
    wath is the statement to navigate in frame "inferiore"
    2)
    instead to use .abi.Value = Format(Range("A" & lngRow), "#00000")
    wath is the statement to insert value in input box vcerca located in frame "inferiore"
    tath is all
    Tks.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: macro no get data from web.... (2000)

    I don't know, Sal. I have no idea how to do this.

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: macro no get data from web.... (2000)

    I have already told you that I cannot help you with this, Sal.

  13. #13
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro no get data from web.... (2000)

    Hi Hans solved 85% but destroyed with the cicling to get data...
    The cicle get the first line (Nominativo, Sel abbr....) not important for me, i want to cicling from the subsegunt lne IMPARATO, A16492, ecc...

    CODE:

    Sub TEST_TELEFONI()

    Dim IE As internetExplorer
    Dim MIAPageHtml As HTMLDocument
    Dim Htable As IHTMLElementCollection
    Dim MIATable As IHTMLTable
    Dim X As Integer, I As Integer, J As Integer
    Dim LINEA As Integer

    Set IE = CreateObject("internetExplorer.Application")
    IE.Visible = True
    IE.navigate "C:/TELEFONI.htm"
    Do Until IE.readyState = READYSTATE_COMPLETE
    DoEvents
    Loop '

    Set MIAPageHtml = IE.document

    Set Htable = MIAPageHtml.frames.Item(1).document.getElementsByT agName("table")

    For X = 0 To Htable.Length - 1
    Set MIATable = Htable(X)

    For I = 0 To MIATable.Rows.Length - 1
    LINEA = LINEA + 1
    For J = 0 To MIATable.Rows(I).Cells.Length - 1
    Cells(LINEA, J + 1) = MIATable.Rows(I).Cells(J).innerText
    Next J
    Next I
    Next X

    IE.Quit
    Set IE = Nothing

    End Sub

Posting Permissions

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