Solved

Select a combobox item

Posted on 2011-03-15
10
722 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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 two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

751 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