Dear all,

Been trying to solve this problem and wondering if someone can help me out.

I am trying to create a vba code to enter a value (XXXXXXX) to a specific box and submit the query.

It works on google but not on the requied website which is only acessible via my work intranet.

the source for the text box on the website is:

input name="ris_pat_id" class="clsText" clsEditNormal" size="26" valtype="string"/

the source for the submit button is:

button title="Refresh Query" class"" id="buttonRefresh" type="button" CAPTION="false" _control="[object Object]"

and my VBA sub is:

Sub test()

Dim ie As Object
On Error Resume Next

With CreateObject("Shell.Application").Windows
If .Count > 0 Then
Set ie = .Item(0)
'ie.navigate "10.152.124.1"
Else
MsgBox "Please log into PACs webclient"
Exit Sub
End If

Do Until Not ie.Busy And ie.readyState = 4
DoEvents
Loop

End With

ie.document.getelementbyid("ris_pat_id").Select
ie.document.getelementbyid("ris_pat_id").Value = "XXXXXXX"
ie.document.getelementbyid("btnG").Click

End Sub


Greatful for anykind of advice!
Thanks in advance!