Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not recognising my objExcel
#1
Not Solved
This has been a mystery to me. When to Set my objExcel. You can say that I am very confussed.

Currently, I create a great spreadsheet called DocViewHref. I save the file then I want to use the data in my spreadsheet.

I am however getting a Run Error while accessing my data.

Object required: 'objExcel'
Function file: O:\QTP Tests\LibraryImageAccessTests-2.qfl
Line (151): " ReportType = objExcel.Cells(r,3).Value"

...
Code:
' START NEW FUNCTION FOR VIEW, ZIP, FAX AND OTHER (DOCVIEW)
Dim objExcel, objFso

Call KillExcel
Call KillPDF

Call CountNumberofDocViewsLinksHrefs (objExcel, rNumber) 'Create Excel Spreedsheet

'Set objExcel = CreateObject("Excel.application") 'Create a new Microsoft Excel object

'Keep the iterations under 20 (equates to 5 DocTypes)
If rNumber > 21 Then
    rNumber = 21
End If

For r = 2 to rNumber ' loop thru your DocView values (from 2 to rNumber or set to #)
        'DocView
        ReportType = objExcel.Cells(r,3).Value
        'abs_x location
        absX = objExcel.Cells(r,4).Value
        'abs_y location
        absY = objExcel.Cells(r,5).Value
        'Href
        Hreff = objExcel.Cells(r,6).Value
...
This use to work. Im not sure if I need to reset the objExcel or not. I do not think I do.

The Call creates and saves the spreadsheet to O:\QTP Tests\QTPOutputData\DocViewHref.xls. The spreadsheet remains open.

What do I need to do differently to access my ss?

thxx
Reply


Messages In This Thread
Not recognising my objExcel - by mv8167 - 07-11-2011, 08:45 PM
RE: Not recognising my objExcel - by rajpes - 07-11-2011, 11:12 PM
RE: Not recognising my objExcel - by guin.anirban - 07-16-2011, 11:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP dosen't recognising that particular JavaTable object. bmimqtp 1 2,342 05-11-2012, 06:07 PM
Last Post: sshukla12
  QTP is not recognising download pop-up samita2011 3 4,238 12-18-2011, 10:39 AM
Last Post: ravi.gajul
  Make my objExcel global mv8167 7 5,140 07-11-2011, 11:27 PM
Last Post: rajpes
  Object not recognising at run time srtanniru.test 2 2,356 12-16-2010, 05:07 AM
Last Post: srtanniru.test
  QTP 9.5 doesn't recognising any controls senthilkumara 0 1,616 09-05-2008, 08:16 PM
Last Post: senthilkumara

Forum Jump:


Users browsing this thread: 1 Guest(s)