S
sidw0501
Can anyone help me solve this "Weird" problem. Here's my Code:
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
Range("A1").CurrentRegion.SpecialCells(xlVisible).Select
Selection.Copy
ie.Navigate URL:="https://live.lehman.com/EPW/loadpage.jsp?force=true"
Do Until Not ie.Busy
DoEvents
Loop
' creates data object
Set MyData = New DataObject
'gets data from the keyboad and stores it in the string
object
MyData.GetFromClipboard
Dim GetOffClipboard As String
'It gets Value from the clipboard and paste it in '
'the text area of the lehmanlive website
GetOffClipboard = MyData.GetText()
'Error is shown in next line of code, most of the time
(ERROR IS MARKED here) ie.Document.all.Item("tickertextarea").Value
= GetOffClipboard
'automatically clicks the buttom1 buttom.
ie.Document.all.Item("buttom1").click()
But I am going through some kinda on and off error. sometimes the code
runs perfectly fine. But for most of the time,in the aboved-marked
line the error occurs saying:
OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET
I trying several different approach, but in vain
Help in this case greatly appreciated!!
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
Range("A1").CurrentRegion.SpecialCells(xlVisible).Select
Selection.Copy
ie.Navigate URL:="https://live.lehman.com/EPW/loadpage.jsp?force=true"
Do Until Not ie.Busy
DoEvents
Loop
' creates data object
Set MyData = New DataObject
'gets data from the keyboad and stores it in the string
object
MyData.GetFromClipboard
Dim GetOffClipboard As String
'It gets Value from the clipboard and paste it in '
'the text area of the lehmanlive website
GetOffClipboard = MyData.GetText()
'Error is shown in next line of code, most of the time
(ERROR IS MARKED here) ie.Document.all.Item("tickertextarea").Value
= GetOffClipboard
'automatically clicks the buttom1 buttom.
ie.Document.all.Item("buttom1").click()
But I am going through some kinda on and off error. sometimes the code
runs perfectly fine. But for most of the time,in the aboved-marked
line the error occurs saying:
OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET
I trying several different approach, but in vain
Help in this case greatly appreciated!!