Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 728
  • Last Modified:

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"
0
toecutter777
Asked:
toecutter777
  • 4
  • 2
1 Solution
 
SiddharthRoutCommented:
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
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now