Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control textbox in frame of 3rd party IE App

Status
Not open for further replies.
Sep 16, 2009
15
CA
I'm trying to scrape data from Attachmate and export to a custom screen panel on an app hosted in IE. With a little help from this forum I've got code functioning but I can't get the data to populate. Any thoughts on how to get control of the panel?

Here's my code so far. The issue I have is at the bottom where I'm trying to control that custom screen panel, the custon screen panel is called MCRTSN and the textbox I want to populate is called txtRaction ....

Sub Main
Dim MyStr As String
Dim MyScreen As Object
Dim objIE as Object, objApp as Object
myStr = Sess0.Screen.GetString(18,68,4)
Set objApp = CreateObject("Shell.Application")
for i = 0 to 20
strName = ""
On Error Resume Next
strName = objApp.Windows(i).document.url
if InStr(strName,"\\MCR\MCR_Alpha\MCRUI.htm") then
set objIE = objApp.Windows(i)
exit for
end If
next
if objIE is nothing then
msgbox("MCR Webpage not found")
else
objIE.all("txtRaction").value = "1234" 'myStr
'objIE.MCRTSN.all("txtRaction").value = "1234" 'Not working
msgbox("MCR " & MyStr)
end if
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top