I am trying to pass value form excel sheet to IE textbox. While i run that procedure display error 438 Object doesnot support this property and method. My code is
Sub open()
Dim str_val1 As Object
Dim i, A As Double
marker = 0
Set objShell = CreateObject("Shell.Application")
Dim btnGo As Object
Dim frm As Object
Dim test As Worksheet
Set test = ActiveSheet
y = 65
i = test.Cells(5, 1).Value
Application.Wait (Now + TimeValue("00:00:05"))
Set objAllWindows = objShell.Windows
For Each ow In objAllWindows
If (InStr(1, ow, "Internet Explorer", vbTextCompare)) Then
test.Range("A"& y) = ow
test.Range("B"& y) = ow.hwnd
test.Range("C"& y) = ow.document.Title
test.Range("D"& y) = ow.LocationURL
y = y + 1
If test.Cells(y - 1, 3).Value = "Collateral" Then
Set IE = objShell.Windows((y - 65))
marker = 1
Exit For
Else
End If
End If
Next
If marker = 0 Then
MsgBox ("A matching webpage was NOT found")
Else
Set str_val1 = IE.document.getElementById("fieldName:COLLATERAL.TYPE") <=== error
str_val1.Value = test.Cells(i + 2, 11).Value
End If
End Sub
Thanks anyway to any help