Solved

Select a combobox item

Posted on 2011-03-15
10
724 Views
Last Modified: 2013-12-20
I have the following code but don't know the correct command to make a selection from a combobox on a website using internetexplorer object. The control name is "widgets" and you can select only one from a dropdowm menu of... widget1, widget2, widget3

Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True

ie.navigate "http://www.samplesite.com"
Do While ie.busy
Loop

ie.Document.all("widgets") = "widget1"
0
Comment
Question by:toecutter777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
10 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 500 total points
ID: 35149522
Did you try

ie.Document.all("widgets").Value = "widget1"

Sid
0
 

Author Comment

by:toecutter777
ID: 35151603
Yes this is VBA, but the problem is in the DOCTYPE declaration and I have posted it as another question. I couldn't find a VBA zone.
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35151935
Did you try the code that I gave?

Sid
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:toecutter777
ID: 35153306
Yes, but I think I have a larger issue. It doesn't seem to work on a website with a doctype declaration. I am OK when it is in quirks mode.
0
 

Author Comment

by:toecutter777
ID: 35153396
This would be a VBA XHTML question
0
 

Author Closing Comment

by:toecutter777
ID: 35175886
I found out I had to run the browser in quirks mode and then it worked, so thanks!
0

Featured Post

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Suggested Courses
Course of the Month6 days, 7 hours left to enroll

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question