How to control radio buttons on a web page?

F

festdaddy

I'm trying to automate getting some building permit info from a website
(http://censtats.census.gov/bldg/bldgprmt.shtml). I've got the state
selection and the submit button working ok, but at the top is a radio
button selector for Place or County, and I can't figure out how to
select County. Here is what I have so far, with some of the things
I've tried:

Sub county_permit_test()

Const URL As String = _
"http://censtats.census.gov/bldg/bldgprmt.shtml"
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")

With ie
.Visible = True
.Navigate URL
Do Until ie.ReadyState = READYSTATE_COMPLETE And Not
ie.Busy: Loop
With .Document.all
'.ret_opt.value("county").checked
'.Item("radio").Value = "county"
'.Item("ret_opt").Value("county") = Checked
.state.Value = "25Massachusetts"
End With
.Document.forms(0).submit
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top