Selecting a choice in Drop-Down Menu

I am using Microsoft Internet Controls. After loading a webpage in it, to fill a textbox (whoami) I am using the following code...

Private Sub WebBr_DownloadComplete()
WebBr.Document.All.whoami.Value = "vshankaa"
End Sub

It is working fine, but I want to know how to select an item from a Drop-Down Menu? Say the DDM has the name "dropmenu" and has "I am a Fool" as one of its item, how to select this item?
shankaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EDDYKTCommented:
EvtPerType.selectedIndex = 3

WebBr.Document.All.comboboxid.text = "I am a Fool"

or


WebBr.Document.All.comboboxid.selectedIndex = 3
shankaAuthor Commented:
WebBr.Document.All.comboboxid.text = "I am a Fool" is not working! As I don't know the index of the item I am not able to use the second method.
EDDYKTCommented:
may be


For i = 0 To WebBr.Document.All.comboboxid.Count
If WebBr.Document.All.comboboxid.options(i).text = "I am a Fool" Then
WebBr.Document.All.comboboxid.selectedIndex = i
End If
Next

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

shankaAuthor Commented:
The If condition part is working! But loop is not working .Count is not the right keyword.
EDDYKTCommented:
how about


For i = 0 To WebBr.Document.All.comboboxid.options.length
shankaAuthor Commented:
This is working!!!!...

For I = 0 To WebBr.Document.All.comboboxid.Options.length
    If WebBr.Document.All.comboboxid.Options(I).Text = "I am a Fool" Then
        WebBr.Document.All.comboboxid.selectedIndex = I
        Exit Sub
    End If
Next
EDDYKTCommented:
But y i only get B grade?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.