reggie55555
MIS
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
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