if the excel sheet specified in script is not there,we get
run time error how to handle the error ,please anybody
explain me in detail
Answer Posted / veeranki naveen
On error resume Next
err.clear
set Excl = createobject("excel.application")
set Workbook=Excl.Workbooks.open("C:\Folder\ExcelFile.xls")
if err.number <> 0 then
msgbox "Excel Sheet is not present at the specified path"
End If
OR
set fso = createobject ("scripting.filesystemobject")
bol = fso.fileexists ("C:\Folder\ExcelFile.xls")
if bol = false then
msgbox "Excel Sheet is not present at the specified path"
End If
msgbox
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is test object model in quicktest professional?
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?
What is Associate Repository in QTP 9.2 ?
What are the views available in quicktest professional (qtp)?
How to indentify MS-Word objects like Menubar, Toolbar, table/columns/rows/cells etc within Word document, using QTP?
.have you ever written compiled module? if yes , tell me about some of the function that you wrote.
is it possible to add sheets to excel at runtime
what are the limitations of smart identification in qtp 9.0
Tell me about qtp?
How you can decide which type of object repository you have to use?
what is the frame work in J-meter?
What is the virtual object?
What are the different recording modes?
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........