Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
web page and excel...
this is my old macro to get data from web: Option Explicit Sub PostalCodes() Dim ie As Object Dim lngRow As Long Dim lngMaxRow As Long Set ie = CreateObject("InternetExplorer.Application") On Error GoTo errHandler lngMaxRow = Range("A65536").End(xlUp).Row With ie For lngRow = 2 To lngMaxRow ..navigate "http://www.canadapost.ca/personal/tools/pcl/bin/quick-e.asp" Do While .busy DoEvents Loop Do While .ReadyState < 4 DoEvents Loop With .document.Forms(1) 'Street Number ..street_number.Value = Range("A" & lngRow) 'Street Name ..street_name.Value = Range("B" & lngRow) 'City ..city.Value = Range("C" & lngRow) 'AB = Alberta, BC = British Columbia, MB = Manitoba, NB = New Brunswick, _ NL = Newfoundland And Labrador, NS = Nova Scotia, NT = Northwest Territories, _ NU = Nunavut, ON = Ontario, PE = Prince Edward Island, QC = Quebec, _ SK = Saskatchewan, YT = Yukon ..prov.Value = Range("D" & lngRow) ..submit End With Do While Not CBool(InStrB(1, .document.URL, "cp_search_response-e.asp")) DoEvents Loop Do While .busy DoEvents Loop Do While .ReadyState < 4 DoEvents Loop On Error Resume Next 'CONSIDERARE PRIMA CELLA COME POSISZIONE "ZERO" Range("E" & lngRow) = UCase(.document.all.tags("table").Item(11).Rows(1) .Cells(7).innerText) Range("F" & lngRow) = UCase(.document.all.tags("table").Item(11).Rows(1) .Cells(1).innerText) On Error GoTo errHandler Next lngRow End With errHandler: ie.Quit Set ie = Nothing Exit Sub End Sub i would want to arrange this code for this link: http://www.bancaroma.it/abicab/index.asp in effect put the value from column A and column B into ABI and CAB txtbox into home page, and get, after the result the value from the search page. Put the value into sheet attached. Tks for all. +-------------------------------------------------------------------+ |Filename: TROVA_CAP_DA_BANCA_DI_ROMA.zip | |Download: http://www.excelforum.com/attachment.php?postid=3601 | +-------------------------------------------------------------------+ -- sal21 ------------------------------------------------------------------------ sal21's Profile: http://www.excelforum.com/member.php...fo&userid=2040 View this thread: http://www.excelforum.com/showthread...hreadid=387507 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Excel 2010 files as web page or single file web page | Excel Discussion (Misc queries) | |||
Format page number in excel footer to start at a specific page # | Excel Discussion (Misc queries) | |||
Excel formula to change page # when data entered in other page | Excel Discussion (Misc queries) | |||
Get header only on first page of multi page excel file | Excel Discussion (Misc queries) | |||
excel fit to 1 page shows 1 page but not all data is on that page | Excel Programming |