Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macros on the Web?
I have a series of numbers that I want to individually populate into an
internet explorer application so I can run a search. How can I make a macro do this? Thanks, Graham |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macros on the Web?
Hi Graham,
You will need the property ID of the form elements on the webpage, which you can generally get by viewing Page Source. The following code is something I use to look up Postal Codes from an Excel addressbook. Sub PostalLookup() Dim ie As Object Dim Rng As String Rng = ActiveCell.Value ' Prepare to open the web page Set ie = CreateObject("InternetExplorer.Application") With ie .Visible = True .navigate "http://www.canadapost.ca/Personal/Tools/Pcl/ Range.aspx" ' Loop until the page is fully loaded 10 Do Until Not .Busy DoEvents Loop ' Make the desired selections on the web page and click the submit Button On Error GoTo 10 Set ipf = ie.document.all.Item("postal_code") 'Selects the field to enter in the postal code ipf.Value = Rng 'Enters the postal code from the ActiveCell into the form Set ipf = ie.document.all.Item ("ctl00_ctl00_ctl00_ctl00_SegmentContent_MainConte nt_PersonalContent_PclContent_Submit") 'Selects the submit button ipf.Click Do Until Not .Busy DoEvents Loop End With End Sub HTH, Steven |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macros on the Web?
On Jul 28, 3:22*pm, Graham wrote:
I have a series of numbers that I want to individually populate into an internet explorer application so I can run a search. How can I make a macro do this? Thanks, Graham Whats the url?..Ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros | Excel Programming | |||
choose default macros Not Enabled / Macros Enable Setting | Excel Programming | |||
weird saving of a document with macros resulting with macros being transfered to the copy | Excel Programming | |||
Macro Size Limit / open macros with macros? | Excel Programming | |||
Macros not appearing in the Tools Macro Macros list | Excel Programming |