Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default 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
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
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros Brian Day Excel Programming 1 March 29th 07 11:20 PM
choose default macros Not Enabled / Macros Enable Setting BEEJAY Excel Programming 2 June 30th 06 01:07 PM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM
Macro Size Limit / open macros with macros? andycharger[_7_] Excel Programming 6 February 13th 04 02:00 PM
Macros not appearing in the Tools Macro Macros list hglamy[_2_] Excel Programming 5 October 24th 03 09:10 AM


All times are GMT +1. The time now is 08:12 PM.

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"