Micro Focus QTP (UFT) Forums
Excel Function. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Excel Function. (/Thread-Excel-Function)



Excel Function. - Amit Singh Chauhan - 02-11-2009

Hi,

I have an excel sheet and have to Copy a range of cells and paste them to anaother sheet which is in other workbook.

I have functions to do this job.

But these function throws general run error after sometime and when I click on Retry button start functioning properly.

I have used following code.

Code:
Set objExcel = GetObject(,"Excel.Application")
Window("Excel").Activate

objExcel.ActiveWorkbook.ActiveWorksheet.Range("A1","F1").Select

Above line throws error sometimes and works properly at some other time.

Is there any other way to to this task???