Solved

Select a combobox item

Posted on 2011-03-15
10
703 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
  • 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Viewers will learn the different options available in the Backstage view in Excel 2013.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now