Dim ie As Object
Dim control As Object
Dim collection As Object
Dim i As Integer
Dim controlnames() As String
Dim checkboxcount, textareacount, textboxcount, buttoncount, linkscount As Integer
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate "http://www.postroika.ru/html/50step2.html"
Do While ie.ReadyState <> 4
DoEvents
Loop
i = 1
If ie.Document.Frames.Length = 0 Then
Set collection = ie.Document.forms(0)
Else
Set collection = ie.Document.Frames(1).Document.forms(0)
End If
ReDim controlnames(0 To collection.Length)
For Each control In collection
controlnames(i) = control.ID
i = i + 1
If control.Type = "checkbox" Then
checkboxcount = checkboxcount + 1
End If
If control.Type = "text" Or control.Type = "password" Then
textboxcount = textboxcount + 1
End If
If control.Type = "textarea" Then
textareacount = textareacount + 1
End If
If control.Type = "button" Or control.Type = "submit" Or control.Type = "reset" Then
buttoncount = buttoncount + 1
End If
Next control
linkscount = ie.Document.Links.Length
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.