Senin, 03 Agustus 2015

[ExcelVBA] Getting selected value


I am using VBA with InternetExplorer object in Excel to select a dropdown box and then switch to the data for that selection.  After this is done, I want to verify that the correct drop down is selected.  I would like to look at the "selected" value.  My HTML source is this:


<option value="1234" selected>CHARLIE BROWN</option>


Is it possible to pick up on the keyword "selected" with a GetAttribute, or do I have to scrape the data, parse out the tags, and look for "selected"?  In other words for parsing, do I have to look for each if the beginning and ending "<option>" tags, and then look for "selected"?








Posted by: "Tim Lewis" <>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: to enter the ezine, then search the ARCHIVES for EXCEL VBA.

Visit our ExcelVBA group home page for more info and support files:

More free tutorials and resources available at:




Tidak ada komentar:

Posting Komentar