Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Object or with block not set

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!!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object required??? What object? jlclyde Excel Discussion (Misc queries) 8 November 1st 08 12:21 AM
End if without Block If Carrie_Loos via OfficeKB.com Excel Worksheet Functions 7 May 14th 08 06:47 PM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
Block Protect RhysPieces Excel Discussion (Misc queries) 3 May 5th 06 06:32 PM
object variable or with block variable not set Diego Excel Discussion (Misc queries) 1 August 9th 05 02:46 PM


All times are GMT +1. The time now is 03:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"