Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving Excel 2010 files as web page or single file web page Joe Artis Excel Discussion (Misc queries) 3 April 29th 23 03:44 AM
Format page number in excel footer to start at a specific page # straitctrydncr Excel Discussion (Misc queries) 4 April 28th 23 07:45 PM
Excel formula to change page # when data entered in other page Solograndma Excel Discussion (Misc queries) 2 March 12th 07 01:35 PM
Get header only on first page of multi page excel file betwms Excel Discussion (Misc queries) 3 March 29th 06 05:47 PM
excel fit to 1 page shows 1 page but not all data is on that page Jans Excel Programming 1 September 2nd 04 01:49 AM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"