Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The test run cannot continue due to an unrecoverable error
#1
Not Solved Rolleyes 
Hi,

I am getting the error mentioned in subject. No matter what is the first line of the code, it fails at that part only by giving this error. Following is the starting piece of code.
-----------------------
Code:
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible=true
-----------------------
Following is the code where I am getting error: Object required: 'God'
-----------------------
Code:
TheDate = Date( )
msgbox TheDate
GetDay = DatePart("d", TheDate)
GetMonth = DatePart("m", TheDate)
GetYear = DatePart("yyyy", TheDate)
MyDate = GetMonth & "/" & GetDay & "/" & GetYear
msgbox MyDate
With ExcelWS.UsedRange
    Set c = .Find (MyDate)
For each c in ExcelWS.UsedRange
If c = MyDate  then
                                                God = ExcelWS.UsedRange.Find(c)
                                                msgbox God
End If
            Set c = .FindNext(c)
Next
End With
FirstAddress= God.Address
SecondAddress =  God.Column
msgbox FirstAddress
msgbox SecondAddress

I am opening an excel application in which I want to write some results, which is later part. I am not able to do this. Please help!!!
Reply
#2
Not Solved
if the value that you are looking for is not found, it will throw the error.

You can try the below code

Code:
intStartRange="A1"
intEndRange="A50"
intFoundRow=ExcelApp.Range(intStartRange,intEndRange).Find(<ValueBeingSearched>).Row

Please note this will always return the row number where the value was first found. To get the next occurance row, you need to set the range again.

Let me know if you need more help.

Regards,
Ankesh
Reply
#3
Not Solved
Hi Ankesh,

Thanks a lot for your reply. I will check and let you know whether it works or not.

Regards,
Neeraj

Hi,

By following, I am able to search the string I wanted to i.e. today's date in the excel sheet.

Code:
intNeer=ExcelWS.UsedRange.Find(MyDate)

It returns correct value. But I want to know the address of the Column+row where it is found. How to do that?

Regards,
Neeraj
Reply
#4
Not Solved
I'm getting a General run error while executing the following script:


Code:
Set objtab=description.create
Objtab(“MicClass”).value=”WebTable”
Set a=Browser("name:= ").Page("title:= ”).childobjects(objtab)
Msgbox a.count
For i=0 to a.count-1
B=a(i).tostring
Print b
next


Please help to resolve this.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,620 02-08-2019, 02:12 AM
Last Post: Ankur
  "Continue to this website (not recommended)." Error we are getting kotaramamohana 7 27,982 07-21-2016, 09:55 PM
Last Post: Ranjith Nair
  Test Set Run automatically Santhosh311 0 2,280 04-14-2016, 06:06 PM
Last Post: Santhosh311
  HI, i'm having a run time error ,please help? Awzar 0 2,386 01-24-2015, 06:52 AM
Last Post: Awzar
  Browser("BrowserName").Back gives General Run Error... deminiek 13 17,624 12-10-2013, 12:53 AM
Last Post: rizvia

Forum Jump:


Users browsing this thread: 1 Guest(s)