Select a combobox item

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"
toecutter777Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
SiddharthRoutConnect With a Mentor Commented:
Did you try

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

Sid
0
 
toecutter777Author Commented:
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
 
SiddharthRoutCommented:
Did you try the code that I gave?

Sid
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
toecutter777Author Commented:
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
 
toecutter777Author Commented:
This would be a VBA XHTML question
0
 
toecutter777Author Commented:
I found out I had to run the browser in quirks mode and then it worked, so thanks!
0
All Courses

From novice to tech pro — start learning today.