View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arry Potter Arry Potter is offline
external usenet poster
 
Posts: 5
Default Internet unnamed button not working

Hi,
I have a web form with 3 fields
Answer - button ,
Answert - text area
and
post it - button

There is no name for "post it" and the button is unnamed. I am using
Internet Application control.

Here is the code I use

Public Sub test()

Dim IE
Dim objShell
Dim s As String
Dim i As Integer
Dim TabKey As String
TabKey = "{TAB}"
For i = 1 To 1 Step 1

s = "https://www.google.com&questionid=" & i

Set IE = CreateObject("InternetExplorer.Application")
Set objShell = CreateObject("WScript.Shell")
With IE
.Left = 20
.Top = 20
.Height = 540
.Width = 950
.MenuBar = 0
.Toolbar = 1
.StatusBar = 0
.Navigate s
.Visible = True
End With

'wait until IE has finished loading itself.
Do While IE.Busy
DoEvents
Loop

IE.document.all("answerbutton").Click
IE.document.all("answervalue").Value = "Excellent Question"






' CloseApp "Microsoft Internet Explorer", "IEFrame"

Next i
End Sub




Please tell me how to proceed

HTML COde for POST IT Button
<input type="button" value="Post It" onclick="javascript:postAnswer(40932)"
class="button" onmouseover="hov(this,'button buttonhov')"
onmouseout="hov(this, 'button buttonout')"</input