Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 28th, 2005, 11:00 PM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access Internet Explorer via Excel VBA

Hello Everyone,
I use the following code to access Internet Explorer via
Excel VBA.

I am trying to find out how do I make a selection of a combobox
in a web page via VBA?

Sub FillInForm()
  'Reference MS Internet Controls
  Dim IE As InternetExplorer
  Set IE = New InternetExplorer

  With IE
    .Visible = True
    .Navigate "http://www.wrox.com"

  'Wait until page is loaded. Warning for endless loop here!
  Do Until IE.ReadyState = READYSTATE_COMPLETE: Loop

  'This is an example on how I enter data to a textbox
  .Document.Forms(1).Elements(0).Value = "Internet Explorer"

  'If the web page has a dropdown box... How do I make my
  'Selection via code?????????
End With
Set IE = Nothing
End Sub

Any help would be appreciated...
Thank You
tony_813


Tony_813
 
Old March 1st, 2005, 05:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

just set the value in the same way, but take care to set it to something that matches one of the value attributes of the <option>'s, rather than one of the displayed text.
 
Old March 6th, 2005, 08:20 PM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank You pgtips

Tony_813





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I access a Web page by Internet Explorer Hoang Excel VBA 7 March 11th, 2008 04:42 AM
Getting info from Internet Explorer into Access AstridVM Access VBA 2 November 2nd, 2007 09:15 AM
Internet Explorer cannot open the internet site cathiec ASP.NET 2.0 Basics 1 October 22nd, 2005 01:30 PM
vba and internet explorer ken1978 VB How-To 0 January 23rd, 2005 09:11 PM
Run VBA Excel File On Internet Explorer DHDang Excel VBA 0 November 12th, 2003 03:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.