Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make my objExcel global
#8
Solved: 11 Years, 3 Months, 4 Weeks ago
check if this code template works

Code:
'function library file

function f1(obj)
set wb=obj.workbooks.open("c:\.....\.xls")
set sh=wb.worksheets(1)
'do some operation
set f1=obj

set wb=nothing
set sh=nothing
end function

function f2(obj)
set wb=obj.workbooks.open("c:\.....\.xls")
set sh=wb.worksheets(1)
'do some operation
set f2=obj

set wb=nothing
set sh=nothing
end function

'action script

set e=createobject("excel.application")

set e= f1(e)

set e=f2(e)

set e=nothing
Reply


Messages In This Thread
Make my objExcel global - by mv8167 - 06-23-2011, 11:13 PM
RE: Make my objExcel global - by rajpes - 07-05-2011, 01:39 PM
RE: Make my objExcel global - by mv8167 - 07-06-2011, 12:30 AM
RE: Make my objExcel global - by rajpes - 07-06-2011, 08:46 AM
RE: Make my objExcel global - by mv8167 - 07-09-2011, 01:36 AM
RE: Make my objExcel global - by rajpes - 07-09-2011, 07:56 AM
RE: Make my objExcel global - by mv8167 - 07-11-2011, 08:53 PM
RE: Make my objExcel global - by rajpes - 07-11-2011, 11:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 1,634 01-05-2020, 10:03 PM
Last Post: Bhuvana
  Error as Global Not defined while trying to retrieve value from Datatable siddharth1609 0 958 09-11-2019, 02:52 PM
Last Post: siddharth1609
  How to make QTP Script to work when system gets locked? ramkumarad 6 12,473 11-02-2017, 03:37 PM
Last Post: Divv
  global object which can be called in any action excellentpawan123 2 2,765 04-01-2015, 07:34 PM
Last Post: babu123
  Local script to make compatible with QC automation2012 1 2,292 01-28-2015, 02:11 PM
Last Post: automation2012

Forum Jump:


Users browsing this thread: 2 Guest(s)